Server Error in ‘/’ Application
- Current custom error settings prevent remote viewing of the application error details for security reasons.
- To enable remote viewing of this error message,create a tag within a "web.config" configuration file located in the root directory of the current web application.
- The current error page can be replaced by a custom error page.
Runtime Error
Table of Contents
Description
An submission error has occurred on the server. Current custom error settings prevent remote viewing of the application error details for security reasons. However, these details can be viewed by browsers running on the local server machine.
Details
To enable remote viewing of this error message,create a <customErrors> tag within a “web.config” configuration file located in the root directory of the current web application. Set the ”mode” attribute of this tag to “Off.”
<customErrors mode="Off" />
Notes
The current error page can be replaced by a custom error page. Modify the “defaultRedirect” attribute of the application’s <customErrors> configuration tag to point to a custom error page URL.
<customErrors defaultRedirect="your_custom_error_page.htm" mode="RemoteOnly" />
Common Runtime Error: Troubleshooting and Solutions
What is a Runtime Error?
A runtime error is a problem that occurs while a program is running. it signals that the program is unable to proceed due to an issue it encountered during its execution. The specific error’s root cause can vary widely, but the symptom is a disruption in the application’s normal operation.
What Does “Submission Error Has Occured on the Server” Meen?
This message indicates that something went wrong when data was being submitted to the server. The error prevents the application from working correctly. The details about the error are deliberately hidden for security reasons.
Why Can’t I See the Error Details?
For security purposes,the server’s current settings are configured to prevent detailed error messages from being displayed remotely. Displaying these details could expose sensitive data and make the application vulnerable to attack.
How Can I View the Error Details?
To view the full details of the runtime error, you need to adjust the server configuration. You can do this by making changes to the web.config file:
Editing the web.config File
- Locate the
web.configfile: This file is situated in the root directory of your web application. - Add or Modify the
tag: You’ll need to create or edit thetag. If it doesn’t exist, you’ll add it. If it does, you will modify its attributes. - Set
mode="Off": Within thetag, set the modeattribute to"Off". This enables the display of detailed error messages.
xml
<customErrors mode="Off" />
Now, when a runtime error manifests, the complete details will be visible in your browser.
How Do I Create a Custom Error Page?
If you prefer to show a custom error page instead of the default system error message, you can configure the web.config file as follows:
- Modify the
defaultRedirectattribute: Within thetag,set thedefaultRedirectattribute to the URL of your custom error page,such as yourcustomerrorpage.htm. - Set
mode="RemoteOnly": To manage when the custom error page is presented, usemode="RemoteOnly". This shows your custom error page to remote users while allowing local users (those on the server machine) to see the detailed error information.
xml
<customErrors defaultRedirect="yourcustomerrorpage.htm" mode="RemoteOnly" />
Note: Ensure that the URL for your custom error page is correct.
Summary of configuration Options
| Configuration | Description | Result |
| :———— | :————————————————————————————– | :——————————————————————————————————– |
| mode="Off" | Displays detailed error messages. | Shows full error details,including technical information,for both remote and local users. |
| mode="RemoteOnly" and defaultRedirect="yourcustomerror_page.htm" |Shows a custom error page for remote users while providing detailed error information to users on the server machine. | Remote users will see the custom error page, while local users will view the standard error information. |
