By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,950 Members | 1,639 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,950 IT Pros & Developers. It's quick & easy.

Urgent help reqd in Exception handling

P: n/a
Hi Guys,

I am developing an asp.net application .In error handling , I have 2 web.congif files ,one is in Web(which is the virtual directory) ,other i have created in a folder in Web/Admin. The problem is i want 2 different custom error handling files ,one for the main site and other for the admin.In the config file in admin I wrote
<customErrors defaultRedirect="CustomErrorAdmin.aspx"
mode="On"
/>

and in the other config file i wrote

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

When i run a file in admin and there is some error ,it successfully go to the CustomErrorAdmin.aspx but when error occurs in the main site ,it throws a runtime error as follows---------------
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed.

Details: To enable the details of this specific error message to be viewable on the local server machine, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "RemoteOnly". To enable the details to be viewable on remote machines, please set "mode" to "Off".
<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="RemoteOnly"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="On" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
Any help will be appreciated .
Thanks,
Kamal


Nov 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.