I have asp.net 2.0 web application. On my production server I "randlomly" cant reproduce the path error on my page which uses UpdatePanel and RadComboBox telerik control:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB7.2; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.2)
Timestamp: Mon, 14 Nov 2011 10:37:17 UTC
Message: Sys.ScriptLoadFailedException: The script 'http://www.mySite.com/ScriptResource.axd?d=K-bZ_cYro-TWH0gbbmdTlkin59eWVsDQYopNlGtfNYd9aZQqi22u0d_A5dwpqMXbaJR99E08UDAgSF7tPCaP0mpZH35-uv4YYRWnSX0mxLsZPGu-58i2Nrmb8UHNokeftpIW9wTPOvZOJJq4cLYfu3iV8EQ1&t=634475972033675436' could not be loaded.
Line: 5
Char: 36564
Code: 0
URI: http://www.mySite.com/ScriptResource.axd?d=qLp9xu4UQDU3wBn-LSS2bLlqFvY6K78U8bVN8Ado2bzP7ytCoarS92INypIVz4z3TbmYil4Bsu_vW_InD5PMZRw-1WJbZIeVuS8TpTL23g_GrfQ29YBzoTaZWO2T3kxiSZPDfk0zqFyT9qKbsPGSfNc4kjnqG509cXg82kYxOpPDJjpf0&t=634532699342719389
Do You know any cause for this error ? Thanks for help in advance.
I had a similar problem with a stylesheet missing. I added:
string sRequestUrl = Request.Url.ToString();
To my error message to get it to output the file in question. Is this a case of you having a script manager which is consolidating (minifying) stylesheets and JavaScript files into one and you are losing the Request Url in the .axd? If you do turn off the consolidation (minification) and you should get the exact file from the Request Url.
If that is the problem.
Related
As a part of build output for a ASP.NET website project we create a bin folder. In order to validate that the build output is actually a functional website we load it into the IIS. And, the browse to it.
Is there a way to automate this in C# ?
I am not looking for a test framework to do this. Just a simple C# light-weight application that can point IIS to this bin folder, test the web application loads thats all.
Make your IIS VirtualDirectory/Application point to your bin folder, or a drop folder that you copy all the bin folders content when you do a Build.
Then do an IISReset:
System.Diagnostics.Process.Start("C:\Windows\System32\iisreset.exe");
Then hit the website using a Webclient:
WebClient client = new WebClient ();
client.Headers.Add ("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
Stream data = client.OpenRead (webUrl);
StreamReader reader = new StreamReader (data);
string s = reader.ReadToEnd ();
Console.WriteLine (s);
data.Close ();
reader.Close ();
I'm using CefSharp3 to embed a chrome browser into my C#.Net application. Everything loads well and works as would in the chrome browser, but the both the disable-web-security command line setting or BrowserSettings.WebSecurity setting stops the embedded browser from preventing me to load scripts from a different origin.
Error message: "Refused to load script...because it violates CSP (Content Security Policy)..."
I thought disabling the setting above disable CSP.
Here is the chrome://version output from the same window/browser:
CEF 3.2704.1432.g60b3718
Chromium 51.0.2704.103
OS Windows
WebKit 537.36
JavaScript 5.1.281.65
Flash
User Agent Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36
Command Line "c:\my_path\documents\visual studio 2015\Projects\My_Solution\My_Project\bin\x64\Debug\My_Project.vshost.exe" --browser-subprocess-path=CefSharp.BrowserSubprocess.exe --no-sandbox --lang=en-US --log-file="c:\my_path\documents\visual studio 2015\Projects\My_Solution\My_Project\bin\x64\Debug\debug.log" --remote-debugging-port=8088 --enable-system-flash=1 --process-per-tab=1 --allow-access-from-files=1 --allow-universal-access-from-files=1 --disable-web-security=1 --no-proxy-server=1
Module Path c:\my_path\documents\visual studio 2015\Projects\My_Solution\My_Project\bin\x64\Debug\libcef.dll
Cache Path cache
From the above, --disable-web-security=1 shows is set, but still CSP is active, how can I make this work to disable CSP?
I've looked at other questions on this forum, but I did not find the case where the setting does not get effected.
I am working on SignalR. Everything working fine in all browser except IE8.
Here is my code.
<script src="~/Scripts/jquery.signalR-2.2.0.min.js"></script>
<script src="../../signalr/hubs"></script>
$(document).ready(function () {
var templateId = '#Model.TemplateId';
var importNotifier = $.connection.runImport;
importNotifier.client.sendMessage = function (data) {
UpdateChart(data);
};
$.connection.hub.start().done(init);
function init() {
importNotifier.server.import(templateId, $("#hdnServerName").val(), '#ViewBag.ServerUserName', '#ViewBag.ServerPassword', '#ViewBag.AuthenticationType', '#ViewBag.DatabaseName');
}
});
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1;
Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR
3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3) Timestamp: Tue, 22 Sep 2015 07:39:12 UTC
Message: Expected identifier, string or number Line: 88 Char: 13 Code:
0 URI: http://localhost:8092/signalr/hubs
Message: Expected identifier Line: 279 Char: 39 Code: 0 URI:
http://localhost:8092/Graph/Graph/?TemplateId=27&IsUse=0
I am not able to understand why it is not working.
I tried to insert http://localhost:8092/signalr/hubs to browser and its allow me to download.
I websockets are not supported in IE8. First version that works with websockets is IE10.
Here's a list of browsers that support(or not) websockets: http://caniuse.com/#feat=websockets
I finally resolved issue.I follow following steps
uninstall all packages which is required for SignalR.
Install again required packages.
I follow this step. because I was in impression that may there was some dependency issue.
Then also my code was not working
finally I change my method name "Import" to "InsertingData"
and its working now.
So I can not conclude here that only name creates any problem (may be import is keyword in ie8) or there is some issue with dependency also.
I just published an AngularJS/WebAPI project using File system publish to a local IIS Application and I can open the website in my browser. Unfortunately, no resources such as images, css etc. can be loaded. When I try to reach any file located in a sub folder I still receive a HTTP 200 from the server, but the body is empty. I can remember I´ve had this issue a few years back but I can´t remember why this happens.
Request
GET http://localhost/Content/images/common/logotype.png HTTP/1.1
Host: XX.XXX.XX.XXX
Connection: keep-alive
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.130 Safari/537.36
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8,sv;q=0.6
Response
HTTP/1.1 200 OK
Server: Microsoft-IIS/8.5
X-Powered-By: ASP.NET
Date: Tue, 25 Aug 2015 07:56:12 GMT
Content-Length: 0
As you can see, there is no body at all but the image exists in the folder and I can open it from the filesystem. I would guess that if this was a privilege issue the server would return 403 or a similar error, not 200 OK?
Facepalm
Turns out that Lex Li:s comment put me in the right direction. I had completely missed to include the "Static Content" feature was missing in IIS "Common HTTP Features".
I am writing a Silverlight app with Telerik Radspreadsheet Control. It runs correctly on Windows 7 and 8 in Firefox, Google Chrome, Opera and IE 9, but some of my clients can not load it on Windows XP in IE 8, and receive this error:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)
Timestamp: Thu, 16 May 2013 13:21:38 UTC
Message: Unhandled Error in Silverlight Application [Parser_CreateInstance_ConstructorInvocation]
Arguments: Telerik.Windows.Controls.RadSpreadsheet
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/? linkid=106663&Version=5.1.20125.0&File=System.Windows.dll&Key=Parser_CreateInstance_Constru ctorInvocation [Line: 47 Position: 40] at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at ECOBox2012WebPanel.DataPage.InitializeComponent()
at ECOBox2012WebPanel.DataPage..ctor()
at ECOBox2012WebPanel.MainPage..ctor()
at ECOBox2012WebPanel.App.Application_Startup(Object sender, StartupEventArgs e)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(UInt32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)
Line: 1
Char: 1
Code: 0
URI: http://ecobox2012web.say-co.com/default.html
Indeed there was an issue that RadSpreadsheet control does not load under Windows XP.
As a member of the team responsible for developing the component, I can confirm that it has already been fixed, so upgrading to the latest official version should solve the problem.