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

6 5 3
7,540 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.

9 7 4
38,600 points

Related questions

0 votes
1 answer 70 views
70 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 jwilliam 3.9k points
0 votes
1 answer 40 views
40 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
0 votes
1 answer 145 views
145 views
Problem : I am getting into the C# coding but I am having following issue: I have below code on the UserControl: using MyFirstDataLayer.Section1; public class MyFirstClass { protected void MyFirstMethod { MyFirstClass.MyFirstItem oItem = new MyFirstClass.MyFirstItem(); oItem = ... name instead I am not sure of what this actually means, I did some research but was unable to figure it out.
asked Dec 18, 2019 alecxe 7.5k points
0 votes
1 answer 8 views
8 views
Problem: I am naive to Asp.Net.I am having a weird looking problem where I am trying to open up my ASP.NET MVC application but I am receiving the below ASP.NET error page which says: Server Error in '/' Application. The resource cannot be found. Description: ... unknown reason to me it seems like it is actually searching for the .aspx file. Please guide me if you think I am missing something.
asked Aug 19 Raphael Pacheco 4.9k points
0 votes
1 answer 881 views
881 views
Problem : I am facing the below error: Failed to load resource: the server responded with a status of 401 (Unauthorized) http://localhost/App/AngularJS/angular.min.js My project works fine on the localhost. But when I try to run it on the IIS (7.5) I often face ... read/write/modify access for the "IUSR" & "IIS_ISURS" users of my whole project. But still I am facing the same exception on my IIS.
asked Dec 24, 2019 alecxe 7.5k points