In asp.net, we can find the exact error message by setting mode="Off" with in customErrors tag in web.config of our application.
To show the detailed message for the unexpected error, you have to create a <customErrors> tage in the Web.config:
<system.web>
<customErrors mode="Off">
</customErrors>
...
...
</system.web>
In Asp.net, there are three error modes to trace an error. These modes decide whether or not an error message is displayed. RemoteOnly mode is default mode for displaying error messages.
Off Mode
This mode is responsible for displaying error mesage on local and remote server in case of an error.
On Mode
This mode is responsible for displaying custom error page with message on local and remote server in case of an error. By using this mode, we can show our own custom error messages page for specific errors on local and remote server.
RemoteOnly
This mode is responsible for displaying error mesage on remote server only in case of an error. By using this mode, we can show our own custom error messages page for specific errors on remote server only.