• Register
0 votes
386 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?

7.5k points

Please log in or register to answer this question.

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.

38.6k points

Related questions

0 votes
1 answer 59 views
59 views
Problem: What am I supposed to do here: The page cannot be displayed because an internal server error has occurred?
asked Jun 16 Rada Gracelynn 104k points
0 votes
1 answer 22 views
22 views
Problem : What is the most effective strategy for me to resolve this issue: The page cannot be displayed because an internal server error has occurred. ne demek?
asked Jun 13 Sifat55 108k points
0 votes
1 answer 291 views
291 views
Problem : I have recently installed a website on my local machine using IIS 7 successfully. But when I tried to deploy it on the live server, I got a following error: "The page cannot be displayed because an internal server error has occurred" Nothing else. Using a same IIS 7 on live and also set to have the Detailed errors in Error Pages module, but still getting a same. What can be the reason?
asked Jan 28, 2020 jwilliam 3.9k points
0 votes
1 answer 9 views
9 views
Problem: What can I do: Http 404 the resource you are looking for?
asked Jun 1 Nahil 128k points
0 votes
1 answer 10 views
10 views
Problem: I'm not sure how I got this : Asp.net is not authorized to access the requested resource.
asked Jun 23 Florina Gulnar 106k points
0 votes
1 answer 7 views
7 views
Problem: There was an error while performing this operation?
asked Jun 28 Mezbah 130k points
0 votes
1 answer 4 views
4 views
Problem: There was an error while performing this operation?
asked Jun 28 Mezbah 130k points
1 vote
1 answer 18 views
18 views
Problem: I am building a website and get this error. Unrecognized attribute 'targetframework'. note that attribute names are case-sensitive.
asked Apr 24 PkGuy 25.9k points
0 votes
1 answer 105 views
105 views
Problem : I am trying to up load my site to my host but I am facing following error message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive. <compilation debug="true" targetFramework="4.0"> My site is working fine on my local PC but it is not at all opening whenever I am trying to view my site after uploading it to my host. How can I resolve the issue?
asked Dec 3, 2019 alecxe 7.5k points
1 vote
1 answer 55 views
55 views
Problem : How to resolve this > error500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed.
asked Apr 25 Abik Dey 4k points