1

This is not a "why don't my resources load in Chrome" question.

I have a site in development (VS 2015 - C#). My site starts off like this:

  1. Default.aspx loads
  2. Server.Transfer("view.aspx");

This works fine and all resources (jquery, bootstrap, css files, etc...) load up in I.E. but fail to load in Chrome.

I have also tried Response.Redirect("view.aspx") and get the same results.

I am passing no content from default.aspx to view.aspx, so there is nothing to preserve there.

If I set the "View.aspx" page to be the startup page, both I.E. and Chrome work fine. This would seem to indicated that my page/resources/references/etc. are fine.

So, why does Server.Transfer and/or Response/Redirect create a failure to load resources under Chrome but direct navigation seems to be fine?

Frank M
  • 1,379
  • 9
  • 18

2 Answers2

0

Try to open developers tools in your web-browser (Chrome) by pressing F12 key. There must be tab "Network". Look there if you got some errors on response.

Vegas Rico
  • 73
  • 9
  • Yes, I can see errors when I use the server.transfer or response.redirect. Checking F12 I can see the following: – Frank M Oct 21 '16 at 17:54
  • Failed to load resource: the server responded with a status of 500 (Internal Server Error) – Frank M Oct 21 '16 at 17:55
  • This does not occur if I set the view.aspx page as the start up page. (Sorry for the extra comments, I could not see how to edit this part. – Frank M Oct 21 '16 at 17:56
  • Turn off "customErrors" in web.config & you will able to see why you got this error in respone. – Vegas Rico Oct 21 '16 at 17:59
0

I also suffering this on Server.Transfer + Chrome , and my error strace shows as below:

Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> 
System.Web.HttpException (0x80004005): Error executing child request for XXX

  at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, 
TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, 
VirtualPath 
path, VirtualPath filePath, String physPath, Exception error, String 
queryStringOverride) 
  at System.Web.HttpServerUtility.Execute(String path, TextWriter writer, 
Boolean preserveForm) 
  at System.Web.HttpServerUtility.Transfer(String path) 

However, It works fine if I use Response.Redirect, and in my research, this issue may result from losing Context inform.

cherishty
  • 373
  • 2
  • 5
  • 13