Wednesday, March 28, 2012

Web.config getting ignored

I have an application where I have the customerrors turned on

<customErrors mode="On" defaultRedirect="HandleErrors.aspx" />

This is emailing me the errors and putting up a custom page and I am getting the emails so it seems to be working. However, there is an internal emailing system within this application. When the email link is click, a new window pops up (required by the client) and the email inbox is displayed. The file that is called is EmailInbox.aspx so it is not going to a different domain or anything. However, if an error occurs within this window, I get the screen that says Runtime Error and tells me that I could see more details if I would set a customErrors tag in my web.config file.

Obviously, there is a customErrors tag or I would be getting the action of seeing a custom page, etc. as I mentioned above in the main part of the application.

Any ideas why a pop up window within the same domain does not recognize the web.config file?

Thanks in advance,

Greg

Hi,

I think you wont get this running from your localhost. You have to publish it somewhere to make that working.

Regards


This is a live, published site. It is not running from localhost.

Greg


Try switcing customerrors off to see what the error is. Sometimes if u get a system out of memory error or similar, the .NET process will stop, leaving the server unable to dish out any .aspx pages like for instance ur HandleErrors.aspx.

This is also a good reason to always make ur defaultRedirect a flat html page.


Unfortunately, this is an error that isn't easily reproduced. It is just happening occasionally and if I log into the exact user and click the exact same thing, the error does not reoccur.

Turning off the custom errors won't help because most likely, I will not see the error, some end user will.

Greg

0 comments:

Post a Comment