• Register
0 votes
86 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 112 views
112 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 50 views
50 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 310 views
310 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 14 views
14 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.3K views
1.3K 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 49 views
49 views
Problem : I came across a problem as follows if you set the autopostback property of a control to true, the page is posted back to the server Any solution on this ?
asked Nov 12, 2019 peterlaw 6.9k points
1 vote
1 answer 41 views
41 views
Problem : I want to create the simple user control that should be the slider. When I try to add the AjaxToolkit SliderExtender to my user control I usually get below error: Server Error in '/' Application. The Controls collection cannot be modified because ... control and also tried adding the textbox and the slider extender to my placeholder programmatically but I am still facing the above error.
asked Dec 14, 2019 alecxe 7.5k points
0 votes
1 answer 12 views
12 views
Problem: Hi, I want to take multiple employee ids in one shot from the user and need to assign them to list .in asp.net, pls help me to sort it out. What I have tried. I have created a text box and tried with validator but it didn't worked out.
asked Sep 14, 2020 boris elin 620 points
0 votes
1 answer 49 views
49 views
Problem : I am facing below error if I try to export datagrid to the excel. &ldquo;Control 'gridview1' of type 'gridview' must be placed inside a form tag with runat=server.&rdquo; Please find below my code : <form runat="server" id="form1"> <div runat="server" id=" ... TextBox> </form> My GridView is within the from tag with the runat="server", but still I am facing above error. How to fix this?
asked Feb 17, 2020 mphil 2.3k points
0 votes
1 answer 16 views
16 views
How can you find the mime type of a file based on the file signature, not the extension in .Net? I want a simple way to get a mime type where the file extension is incorrect or not given, something similar?
asked Aug 29, 2020 Aliza313 720 points