find and solve || findandsolve.com
Please wait.....

To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application

To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application

I have created an asp.net webpage using MVC Razor and I have uploaded it onto an IIS. However, when I try to view the page remotely, I get errors about the custom error-tag in the web.config file. The page works locally with no errors or warnings.

Here is the error page:


Server Error in '/' Application.

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 remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, 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 "Off".


<!-- Web.Config Configuration File -->
<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </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="RemoteOnly" defaultRedirect="mycustompage.htm"/>    </system.web>
</configuration>


SOLUTION



Option 1.

If this type of error has been occurred then set Off <customErrors>tag in web.config file. If you want to see the exact error of the page you must turn Off custom error mode. After changing the web.config file save and reloading the page you can view the exact error of the page. This setting is under<system.web> like as given below.

 <system.web>
   <customErrors mode="Off" />
 </system.web>


Option 2.

You should only have one <system.web> in your Web.config Configuration File.

  <system.web>
    <customErrors
mode="Off"/>
    <compilation
debug="true"/>
    <authentication
mode="None"/>
  </system.web>


Option 3.

To view the correct and complete error, run the webmail client on the server. This should show the complete error. If not then it will be required to edit the web.config file. The web.config file can be found at the following location by default;

<customErrors mode="Off" /> 
<customErrors mode="RemoteOnly" />

OR

 <customErrors mode="ON" />

Mahira  khanna

Mahira khanna

I have the skills you need for you company blog, website, or other content materials

If findandsolve.com felt valuable to you, feel free to share it.

Comments



Report Response