Iss ошибка 500

If your Internet Information Services (IIS) produces a 500 – Internal server error, your website is in serious trouble. Debugging an IIS 500 – Internal server error can take some time, so you'd better be prepared for the worst-case scenario. You don't want to research how to deal with this error under time pressure.

If your Internet Information Services (IIS) produces a 500 – Internal server error, your website is in serious trouble. Debugging an IIS 500 – Internal server error can take some time, so you’d better be prepared for the worst-case scenario. You don’t want to research how to deal with this error under time pressure.

Contents

  1. Cause of 500 – Internal server error
  2. Debugging an IIS 500 – Internal server error
  3. Resolving an IIS 500 – Internal server error
  4. Common 500.x substatus codes
  • Author
  • Recent Posts

Surender Kumar has more than twelve years of experience in server and network administration. His fields of interest are Windows Servers, Active Directory, PowerShell, web servers, networking, Linux, virtualization, and penetration testing. He loves writing for his blog.

Latest posts by Surender Kumar (see all)

  • Extending LVM space in Ubuntu — Thu, Feb 2 2023
  • Backup in Proxmox VE — Thu, Jan 26 2023
  • Snapshots in Proxmox VE — Wed, Jan 25 2023

In my previous posts, you learned about detailed errors and failed request tracing in IIS (Internet Information Server). I recommend reading those articles first before you proceed with this one.

Cause of 500 – Internal server error

This is the most common error you will encounter with any website hosted with IIS. In most cases, a developer messed up. Thus, the fastest way is often to simply reverse the last action taken, such as restoring an earlier version of your web application. Once your system is running again, you can investigate the cause of the error on your test side in peace.

500 Internal server error

500 Internal server error

The HTTP 500 error is a server-side error. While we understand that the problem is on the server end, the error is usually ambiguous. It doesn’t exactly tell the administrator what is wrong with the server. Thus, debugging a 500 – Internal server error often takes some time.

Debugging an IIS 500 – Internal server error

Since the above error doesn’t really tell what’s actually wrong with the server, we need to enable detailed errors, as discussed in my previous post. Once detailed errors are enabled, you will see more detailed error information, including an HTTP substatus code. Sometimes even the detailed errors don’t show any useful information right away. For example, see the following screenshot:

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

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

Here I am getting: The page cannot be displayed because an internal server error has occurred. There is no HTTP status code or substatus code listed on the error page. If you get such an error even when detailed errors are enabled, right-click anywhere in the browser window and select Inspect (or press F12).

Opening developer tools in web browser to reveal server errors

Opening developer tools in web browser to reveal server errors

This opens the developer tools in your browser window. Now, click the Console tab. The actual error thrown by the web server is displayed.

Viewing server errors using the Console tab of the web browser's developer tools

Viewing server errors using the Console tab of the web browser’s developer tools

To further understand the exact cause of 500 errors, enable Failed Request Tracing, as discussed in my previous post. Now, try to replicate the problem. If you can replicate it, open the newly generated XML log file in a web browser. The following screenshot shows the actual cause of a 500 – internal server error with a substatus code of 19 (HTTP 500.19 error):

Determining the cause of a 500 error using the Failed Request Tracing log file

Determining the cause of a 500 error using the Failed Request Tracing log file

Usually, substatus code 19 indicates that the configuration data is invalid. This could be due to some malformed or unidentified element in a server-level config file (ApplicationHost.config) or website-level config file (web.config). If you take a closer look at the ConfigExceptionInfo field of the log file, you will find the exact line number (6 in our case) in the web.config file that caused the exception. Now let’s take a look at the web.config file itself.

Viewing the problematic element in the web.config file

Viewing the problematic element in the web.config file

Here, you can see that the developer tried to add a mime type in the config file, but it was already defined in the server-level configuration file (i.e., ApplicationHost.config). Therefore, the Cannot add duplicate collection entry of type ‘mimeMap’ with unique key attribute ‘fileExtension’ set to ‘.mp4’ exception was returned. Furthermore, if there is some unidentified element, a syntax error, or even a typo in the web.config file, you will most likely get a similar error.

Resolving an IIS 500 – Internal server error

To resolve an IIS 500 – Internal server error, you could simply remove the line that is causing the exception. Alternatively, if you don’t want to remove this line for some reason, add the following code right above line 6 in web.config:

<remove fileExtension=".mp4" />

By doing this, you are essentially overriding the server-level element. In the end, your web.config file should look as shown below:

Overriding the server level mime element with web.config file

Overriding the server level mime element with web.config file

Now refresh the page, and the error should go away. This was just one example of resolving a 500.19 error. If you get a 500 error with a different substatus code, use the same approach to troubleshoot the problem.

Common 500.x substatus codes

The following table covers some of the most common HTTP 500 substatus codes, along with their probable causes and troubleshooting advice:

Subscribe to 4sysops newsletter!

Status Code Probable Cause Troubleshooting Advice
500.11 The application is shutting down on the web server The application pool is shutting down. You can wait for the worker process to finish the shutdown and then try again.
500.12 The application is busy restarting on the web server This is a temporary error and should go away automatically when you refresh the page. If the error persists, something is wrong with the web application itself.
500.13 The web server is too busy This error indicates that the number of incoming concurrent requests exceeded the number that your IIS application can process. This could be caused when the performance settings are not right. To troubleshoot such issues, a memory dump needs to be captured and analyzed using tools such as Debug Diagnostic.
500.15 Direct requests for Global.asax file are not allowed A direct request was made for the Global.asa or Global.asax file, which is not allowed by the web server
500.19 The configuration data is invalid We already covered how to fix this error above
500.21 The module not recognized This status code is caused by a partial installation of the IIS server, such as missing ISAPI modules. To fix this error, identify the missing IIS components and install them.

Once you troubleshoot the problem, don’t forget to disable Failed Request Tracing and revert the detailed errors to custom errors on your web server.

I have installed SP 2010 in a Windows Server 2008 R2 loaded environment. I have been using VS 2010 for developing application pages for SP 2010.

I make use of wsp builder to package all my dlls, pages, scripts and images into a solution package and deploy it in the web applications.

Everything was working like a charm. I started enduring a torrid time when all of a sudden my web applications started popping up with ‘HTTP 500 Internal Server Error’. This started happening after I made some drastic changes in my application pages and deployed it.

I tried creating new web applications but its not doing me any good. Any insights on what could be the source of this issue?

Regards,
Raghuraman.V

skaffman's user avatar

skaffman

396k96 gold badges814 silver badges768 bronze badges

asked Dec 11, 2010 at 9:32

Raghu's user avatar

Fixed this problem by editing the Web.config and applicationhost.config.
C:Users\DocumentsIISExpressconfig or right click the IIS Express icon on the tray and view all application and click the desired website and then click the configuration file link.

Comment out

<error statusCode="500" prefixLanguageFilePath="%IIS_BIN%custerr" path="500.htm" />

Set the parent node to <httpErrors errorMode="DetailedLocalOnly"

Set the httpErrors to Allow

<section name="httpErrors" overrideModeDefault="Allow" />

Change your web project web.config HttpErrors

<httpErrors errorMode="Custom" existingResponse="Auto">

That should fix it, its basically saying that «I dont want IIS Express to override the configuration of my site».

Stephen's user avatar

Stephen

1,7372 gold badges28 silver badges37 bronze badges

answered Feb 16, 2012 at 12:27

Atif Rehman's user avatar

6

To resolve, you should first instruct IIS to display detailed error messages, instead of just «500».

Adjust your web.config file and set custom errors to off:

<customErrors mode="Off" />

(case-sensitive).

In addition, if you are using Internet Explorer, turn of the advanced option «Show friendly error messages».

answered Dec 11, 2010 at 9:45

Uwe Keim's user avatar

Uwe KeimUwe Keim

39k56 gold badges175 silver badges289 bronze badges

3

To help others, here there is a guide that helped me to find what was wrong with my setup (credits to Rick Barber):
Working past 500

  1. Load the site from a browser located on the same server. In IE you may need to turn off ‘show friendly http errors.’
  2. Temporarily add the following within the appropriate tags in your web.config file:

    <configuration>
        <system.webServer>
            <httpErrors errorMode="Detailed" />
        </system.webServer>
        <system.web>
            <customErrors mode="Off" />
            <compilation debug="true" />
        </system.web>
    </configuration>
    
  3. Open up IIS Manager and try to open up some of the different features by double clicking on the icon. If there is an error in the web.config file and it can’t even parse it, sometimes you will get a helpful error.

  4. Look in Windows Event Viewer. Sometimes you can find the detailed error logged in there, particularly Application Event Viewer.
  5. Setup Failed Request Tracing. This is especially helpful if it is an intermittent 500 error.
  6. Look through the web log files. This is especially helpful for an intermittent 500 error. You can often parse the log files to see if there is a trend with a specific page that is throwing a 500 error.

Community's user avatar

answered Feb 24, 2015 at 11:01

Ricardo stands with Ukraine's user avatar

  • Remove From My Forums

 locked

IIS7 — HTTP Error 500.0 — Internal Server Error

  • Question

  • User-471287741 posted

    I am using Vista Ultimate and Visual Studio 2005 and Expression Web.  I can run Hello_World.aspx and defualt.htm from both the development servers in VS and EW without issue.  However, when I try to run the same files from IIS7, I receive the Server
    Error below.  I have setup the site as a virtual directory in IIS7, and all files are local to my C drive.  What is odd to me is that iisstart.htm does work from local host without problem, so it seems that its a problem with my virtual directories. 
    Any help is appreciated.  Thanks.

     Server Error


    HTTP Error 500.0 — Internal Server Error

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

    Error Code: 0x80070005

    Notification: BeginRequest

    Module: IIS Web Core

    Requested URL: http://localhost:80/ExpressionTest/default.htm

    Physical Path: C:UsersPhillip_DevelopementVisual Studio 2005WebSitesExpressionTestdefault.htm

    Logon User: Not yet determined

    Logon Method: Not yet determined

    Handler: Not yet determined

    Most likely causes:

    • IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
    • IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.
    • IIS was not able to process configuration for the Web site or application.
    • The authenticated user does not have permission to use this DLL.
    • The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.

    What you can try:

    • Ensure that the NTFS permissions for the web.config file are correct and allow access to the Web server’s machine account.
    • Check the event logs to see if any additional information was logged.
    • Verify the permissions for the DLL.
    • Install the .NET Extensibility feature if the request is mapped to a managed handler.
    • Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click
      here.

    More Information…
    This error means that there was a problem while processing the request. The request was received by the Web server, but during processing a fatal error occurred, causing the 500 error.

    Microsoft Knowledge Base Articles:


    • 294807

    Server Version Information: Internet Information Services 7.0.

Answers

  • User-471287741 posted

    Seem to have solved my issue with the following: 

    1.    Removed IIS and WAS.  Re-installed with the following settings:

    Web Management Tools (default) — IIS Management Console

    WWW Services — Application Development Features — ALL

                            — Common Http Features — ALL

                            — Health and Diagnostics — ALL

                            — Performance Tracing — ALL

                            — Security (default) — Request Filtering

    2.   Add «Users» to folder security options for each folder being added as a virtual directory in IIS7

    Worked!!!!

     
    I got the suggestion from the following
    blog

    Additional Question: Any suggestions on these IIS7 settings, or are the above settings OK for dev purposes?  Thanks.
     

    • Marked as answer by

      Tuesday, September 28, 2021 12:00 AM

Понравилась статья? Поделить с друзьями:
  • Isql error could not sqlconnect
  • Ispring free cam ошибка экспорта
  • Ispring free cam ошибка initialize
  • Ispmanager server or network error
  • Ispmanager roundcube database error connection failed