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

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.

9 7 4
38,600 points

Related questions

0 votes
1 answer 144 views
144 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 71 views
71 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 5 views
5 views
Problem: I have a web project in my solution file that is "unavailable" when I open the solution. When I right-click on the web project and reload the project, I get the following error: The Web Application Project mycompany.myapp.mywebproject is configured to use IIS. The Web Server 'http://localhost/MyWebApp could not be found.
asked Mar 20 ummesalma 22k points
0 votes
1 answer 5 views
5 views
Problem: I am getting the error : Maximum request length exceeded when I am trying to upload a video in my site. How do I fix this?
asked Mar 21 ummesalma 22k points
0 votes
1 answer 517 views
517 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 40 views
40 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, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 1.9K views
1.9K 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
0 votes
1 answer 5 views
5 views
Problem : cannot drop database because it is currently in use
asked Feb 24 Shovo210 13.2k points
0 votes
1 answer 3 views
3 views
Problem: Everything works fine, except when I go to access Property1. The intellisense only gives me "Equals, GetHashCode, GetType, and ToString" as options. When I mouse over the oItem.Property1, Visual Studio gives me this explanation: MemberMyDataLayer.Section1.MyClass.MyItem.Property1. ... a type name instead I am unsure of what this means, I did some googling but wasn't able to figure it out.
asked Mar 30 ummesalma 22k points
0 votes
1 answer 20 views
20 views
Problem: are you missing a using directive or an assembly reference.
asked Feb 18 charles mathews 5.5k points