I need this only. when i browse this application in some other machine i need to get the actual error"Sql server does not exists" not the "Run time Error",
Hi pooja,
From your description, I understand that when you browse the web page locally, you can get the actual error, such as ?Sql server does not exist?. However, if you browse the page from another machine, the browser only returns ?Runtime Error?. Your concern is how to display the actual error. If I have any misunderstanding, please let me know.
For this issue, I think prabhatvastav has already answered you. The solution is setting customErrors mode to ?Off? in web.config. The default mode is set to ?RemoteOnly? for security reason.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
For more information about customErrors element, please refer to the following link:
customErrors Element (ASP.NET Settings Schema)
http://msdn2.microsoft.com/en-us/library/h0hfz6fc(VS.80).aspx
Sincerely,
Benson Yu
Microsoft Online Community Support
Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.