• Register
0 votes
40 views

Problem :

I want to deploy my ASP.NET application. I have tried deploying my site to IIS, but when I visit it with the browser, it gives me following error :

Server Error

500 - Internal server error.

There is a problem with the resource you are looking for, and it cannot be displayed.

After searching around in my web.config, I found following error:

The page cannot be displayed because an internal server error has occurred.

I want to see the actual issue behind my server error?

by (7.5k points)  

1 Answer

0 votes

Solution :

Please enable and see the detailed errors of the web messages, as this is a very general message without giving much information on the details for security reasons.

With the detailed error message, you will be able to locate the real issue.

Please run your browser on the server, you will find details of the error, as your server recognizes that you are a local and will show it to you. 

You can read the log of your server by using the Event Viewer, you will also see the details of the error.

On IIS 6

<configuration>

    <system.web>

        <customErrors mode="Off"/>

        <compilation debug="true"/>

    </system.web>

</configuration>

On IIS 7

<configuration>

    <system.webServer>

        <httpErrors errorMode="Detailed" />

        <asp scriptErrorSentToBrowser="true"/>

    </system.webServer>

    <system.web>

        <customErrors mode="Off"/>

        <compilation debug="true"/>

    </system.web>

</configuration>

You can avoid the Debug=true. You only need to close your custom errors for a while and you will see the detailed error page.

by (36.1k points)  
...