c# - ASPX-Handler calls full website lifecycle again -


my aspx website has css files , js files linked ashx files. example got <script type="application/javascript" src="/javascript.ashx"></script> in markup. when debug website in chrome (newest version without add-ons) calls entire life cycle again.

for test purposes cleared processrequest method of handlers , accessed directly. (http://localhost:1234/javascript.aspx). after handler finished processrequest method jumps default() constructor of default.aspx (after continues run through whole life cycle obviously). think after request chrome did access (http://localhost:1234/) in background unknown reason , called life cycle of default.aspx seperately ispostback = false , iscallback = false.

the weird thing in internet explorer 11 not face problem.

how can be? problem of chrome only? appear when using live version? there work around?

ok found out caused by: web.config contained

    <customerrors mode="on" redirectmode="responseredirect">         <error statuscode="404" redirect="/" />     </customerrors> 

and

<system.webserver>     <httperrors errormode="custom">         <remove statuscode="404" />         <error statuscode="404" path="/" responsemode="redirect" />     </httperrors> </system.webserver> 

i know that's wrong way handle 404 responses, not on way leave it. wonder why chrome gets 404 response, when handler returns content? because reason how forward "/" , repeat life cycle.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -