При обработке запроса произошла ошибка iis

title author description ms.date ms.assetid msc.legacyurl msc.type

How to Use HTTP Detailed Errors in IIS 7.0

rick-anderson

Every Web-Site Administrator or Web Developer has seen ‘404 — File not found’, ‘401 — Unauthorized’ or ‘500 — Server Error’ messages in his browser. This ar…

12/12/2007

33897393-97b8-4ee1-836f-25b1348dc3a3

/learn/troubleshoot/diagnosing-http-errors/how-to-use-http-detailed-errors-in-iis

authoredcontent

by IIS Team

Introduction

Every Web-Site Administrator or Web Developer has seen «404 — File not found», «401 — Unauthorized» or «500 — Server Error» messages in his browser. This article helps you understand how and why IIS generates these errors and how they can be configured.

Many might think that generating error messages does not seem to justify a full article. But there is more to errors than meets the eye. Error messages are a sensitive topic, because every error reveals more about your web-site than you might want revealed. The more information someone can gather about your site, the likelier it is that you will be hacked. A search for «google hacking» or «cross-site scripting» reveals a wealth of information on this topic.

However, error messages are also a valuable tool to troubleshoot problems. Developers and Web-Site Administrators require as much detail as possible when an error occurs. Ideally the error message gives recommendations on how to fix the problem. Here is how IIS addresses these fundamentally opposed goals.

Errors, What Errors?

This article talks about HTTP errors as specified in the HTTP RFC (RFC 2616 — section 6.1.1). An HTTP error is always expressed by sending a response with a status code greater than 400 back to the requesting client.

Client Errors

Status codes between 400 and 500 specify an error that the client made, e.g. bad syntax or a request to a resource that doesn’t exist. You can try this by requesting a bogus URL from the web-site of your choice, for example: http://<IIS7Server>/this_resource_does_not_exist. You get a «404 — File not found» error.

Server Errors

Status codes starting with 500 are errors caused by the server. The most common causes for 500 errors on IIS systems are:

  • An ASP or ASPX page that contains a syntax error
  • The web server configuration or the application configuration cannot be read or is invalid
  • The site is stopped

It is important to note that browsers like IE often replace errors returned from a web server with their own errors. This makes troubleshooting harder. In IE you can turn this feature off. Go to the «Tools» menu, select «Internet Options», click the «Advanced» tab and find the «Show friendly HTTP error messages» check box and uncheck it. To see the raw response, use HTTP tools like WFETCH in the IIS 6.0 Resource Kit (see «Related Links»).

HTTP Errors in IIS

There are two things that can happen when the httpError module (custerr.dll) encounters an error:

  • A custom error is generated
  • A detailed error is generated

Custom errors are error pages that the regular users of your web-site see. They contain a brief error description of why the error happened, but nothing else. Here is the custom error generated when you request a resource that does not exist, for example: http://<IIS7Server>/this_resource_does_not_exist

Screenshot of the the H T T P Error 404 file or directory not found webpage in Internet Explorer.

Detailed errors are intended for local administrators and developers. They are supposed to provide information that helps to immediately fix the problem. Here is an example of the same request, but now returning a Detailed Error:

Screenshot of the Server Error in Default Web Site Application webpage, showing a Cause and Solution section for the error.

This is dangerous, because Detailed Errors contain information about the inner workings of your web-site. Only trusted personnel should see a Detailed Error. The only way to ensures this is to only generate a detailed error if the request comes from the local machine. As soon as the request is not local, a custom error is generated. Look at the following flow diagram:

Diagram of the Status Substatus, Entity Body, and Set Error's path of creating a detailed error.

Data Flow

First: Error check

The httpError module receives a notification if a response is about to be sent (RQ_SEND_RESPONSE notification). The httpError module checks the status code of this response and immediately returns if the status code is not greater than 400.

Second: Custom Error or Detailed Error

The next check is determined by the request origin (is the request a local or remote request) and the setting of the errorMode property. The errorMode property is set to DetailedLocalOnly, which means that Custom Errors are generated for every remote request. If errorMode is set to «Custom», then all error responses will become Custom Error. If errorMode is set to «Detailed» all error responses will become Detailed Errors. The following table clarifies this behavior:

errorMode Request origin Action
DetailedLocalOnly (default) Local Detailed Error
DetailedLocalOnly (default) Remote Custom Error
Custom Local Custom Error
Custom Remote Custom Error
Detailed Local Detailed Error
Detailed Remote Detailed Error

If the httpError module determines that a Custom Error must be generated, it looks into its configuration to see if it can find a matching error. If a match is found, it sends the static file, redirects the request or executes the URL specified. If no match can be found, IIS send a basic one-line message containing the status code. The next section explains the Custom Error configuration in detail.

If custerr.dll determines that a Detailed Error must be generated, another check is needed. IIS does not touch the response if a module overrode the entity of the response with its own error description. It might contain valuable information. ASP.NET is a good example. The entity of an ASP.NET error response might contain the exception stack and its own error description. A Detailed Error is only generated if the entity body of the response is empty.

<httpErrors> Configuration

Here is the IIS custom error section obtained on a clean install:

[!code-xmlMain]

You see that if the status code of a response is 401, IIS will return a file named 401.htm.

Sub-Status Codes

Many HTTP errors have a sub-status. The IIS default Custom Errors configuration does not differentiate based sub-status codes. It sends the same Custom Error page if you enter the wrong credentials (401.1), or if you get access denied based on invalid rights to access a file (401.3). You can see the different sub-status codes in the log files or via Detailed Errors. Here is a list of the different 404 sub-status codes that IIS produces:

Status Description
404.1 Site could not be found
404.2 Denied by Policy. The request ISAPI or CGI program is not allowed in the Restriction List.
404.3 The static file handler did not have the file in its MimeMap and therefore rejected the request.
404.4 No handler was found to serve the request.
404.5 The Request Filtering Module rejected an URL sequence in the request.
404.6 The Request Filtering Module denied the HTTP verb of the request.
404.7 The Request Filtering module rejected the file extension of the request.
404.8 The Request Filtering module rejected a particular URL segment (characters between two slashes).
404.9 IIS rejected to serve a hidden file.
404.11 The Request Filtering module rejected a request that was double escaped.
404.12 The Request Filtering module rejected a request that contained high bit characters.
404.14 The Request Filtering module rejected a request with a URL that was too long.
404.15 The Request Filtering module rejected a request with a too long query string.
413.1 The Request Filtering module rejected a request that was too long (request + entity body).
431 The Request Filtering module rejected a header that was too long.

You can configure the httpErrors section to show a Custom Error for particular sub-status codes. If you add the following line to the httpErrors configuration section, IIS returns 404_3.htm if a file with a file extension is requested that is not included in the IIS MimeMap (<staticContent> configuration section).

[!code-xmlMain]

Here is how to make the example work:

  1. Add the entry above to your httpErrors configuration section.
  2. Create a file named 404_3.htm in your c:inetpubcusterren-us directory.
  3. Create a file named test.yyy in you c:inetpubwwwroot directory.
  4. Now request http://localhost/test.yyy.

The file extension .yyy is not part of the IIS MimeMap and the static file handler will not serve it.

New in IIS: Language-specific Custom Errors

Each more recent browser includes the language of the client as a request header. Here is an example of how this header might look:

[!code-consoleMain]

The syntax and registry of accepted languages is specified in RFC1766.

When generating an error, IIS takes this header into account when it looks for the custom error file it returns. It generates the path for the custom error using the following logic:

prefixLanguageFilePath configuration setting (for example c:inetpubcusterr)+
Accept-Language header sent by the client (for example en-us) +
Path configuration setting (for example 404.htm)

Example:

If the browser sends a request for an non-existing resource and the «Accept-Language» header has the value of «en-us,» the file that gets returned will be c:inetpubcusterren-us404.htm.

For example, if you are from Germany, you want your error messages in German. To do this, you must install the Windows Vista Language Pack for German. This creates the c:inetpubcusterrde-DE directory with custom error files in it. Now if the browser sends the «Accept-Language» header with the value of «de-DE, the file that gets returned will be c:inetpubcusterrde-DE404.htm.

IIS will always fall back to the system language if the directory «de-DE» does not exist.

[!NOTE]
Internet Explorer allows you to configure the Accept-Language header. Go to «Tools» — «Internet Option», select the «General» tab and click the «Languages» button.

Custom Error Options

In the above examples, IIS sends the contents of the file as the custom error response. IIS has two other ways to respond to an error: by executing an URL or by redirecting the request.

ExecuteUrl

If you want to do more in your custom error, e.g. sending an e-mail or logging the error to a database, you can execute an url. This allows you to execute dynamic content like an ASP.NET page. The example below replaces the 404 custom error. Now IIS executes /404.aspx whenever a 404 error occurs.

[!code-xmlMain]

Security Considerations

A word of caution: For architectural reasons, IIS can only execute the URL if it is located in the same Application Pool. Use the redirect feature to execute a Custom Error in a different Application Pool.

IIS can also return a 302 Redirect to the browser when a particular error occurs. Redirect is good if you have a server farm. For instance, you can redirect all your errors to a central location that you closely monitor.

There is risk however: responseMode=»File» (which is the default) allows you to specify every file on the disk. This will not work if you are very security conscious.

A workable scenario might include only allowing the delegation of the errorMode setting. This enables a developer to receive Detailed Errors for his application even if he is using a remote client. All that is necessary is to set errorMode=»Detailed». Here is how to configure this scenario:

Allow the delegation of the httpErrors section:

[!code-xmlMain]

Second, go to the <httpErrors> section in applicationHost.config and change it so that only errorMode is delegated:

[!code-xmlMain]

Summary

Custom and Detailed Errors are powerful IIS features. They help you to troubleshoot problems without compromising the security of your IIS Server. Many configuration options help you to custom tailor your users’ experience. Most importantly: experimenting with it is fun.

See also

  • Troubleshooting Common IIS Errors
title author description ms.date ms.assetid msc.legacyurl msc.type

How to Use HTTP Detailed Errors in IIS 7.0

rick-anderson

Every Web-Site Administrator or Web Developer has seen ‘404 — File not found’, ‘401 — Unauthorized’ or ‘500 — Server Error’ messages in his browser. This ar…

12/12/2007

33897393-97b8-4ee1-836f-25b1348dc3a3

/learn/troubleshoot/diagnosing-http-errors/how-to-use-http-detailed-errors-in-iis

authoredcontent

by IIS Team

Introduction

Every Web-Site Administrator or Web Developer has seen «404 — File not found», «401 — Unauthorized» or «500 — Server Error» messages in his browser. This article helps you understand how and why IIS generates these errors and how they can be configured.

Many might think that generating error messages does not seem to justify a full article. But there is more to errors than meets the eye. Error messages are a sensitive topic, because every error reveals more about your web-site than you might want revealed. The more information someone can gather about your site, the likelier it is that you will be hacked. A search for «google hacking» or «cross-site scripting» reveals a wealth of information on this topic.

However, error messages are also a valuable tool to troubleshoot problems. Developers and Web-Site Administrators require as much detail as possible when an error occurs. Ideally the error message gives recommendations on how to fix the problem. Here is how IIS addresses these fundamentally opposed goals.

Errors, What Errors?

This article talks about HTTP errors as specified in the HTTP RFC (RFC 2616 — section 6.1.1). An HTTP error is always expressed by sending a response with a status code greater than 400 back to the requesting client.

Client Errors

Status codes between 400 and 500 specify an error that the client made, e.g. bad syntax or a request to a resource that doesn’t exist. You can try this by requesting a bogus URL from the web-site of your choice, for example: http://<IIS7Server>/this_resource_does_not_exist. You get a «404 — File not found» error.

Server Errors

Status codes starting with 500 are errors caused by the server. The most common causes for 500 errors on IIS systems are:

  • An ASP or ASPX page that contains a syntax error
  • The web server configuration or the application configuration cannot be read or is invalid
  • The site is stopped

It is important to note that browsers like IE often replace errors returned from a web server with their own errors. This makes troubleshooting harder. In IE you can turn this feature off. Go to the «Tools» menu, select «Internet Options», click the «Advanced» tab and find the «Show friendly HTTP error messages» check box and uncheck it. To see the raw response, use HTTP tools like WFETCH in the IIS 6.0 Resource Kit (see «Related Links»).

HTTP Errors in IIS

There are two things that can happen when the httpError module (custerr.dll) encounters an error:

  • A custom error is generated
  • A detailed error is generated

Custom errors are error pages that the regular users of your web-site see. They contain a brief error description of why the error happened, but nothing else. Here is the custom error generated when you request a resource that does not exist, for example: http://<IIS7Server>/this_resource_does_not_exist

Screenshot of the the H T T P Error 404 file or directory not found webpage in Internet Explorer.

Detailed errors are intended for local administrators and developers. They are supposed to provide information that helps to immediately fix the problem. Here is an example of the same request, but now returning a Detailed Error:

Screenshot of the Server Error in Default Web Site Application webpage, showing a Cause and Solution section for the error.

This is dangerous, because Detailed Errors contain information about the inner workings of your web-site. Only trusted personnel should see a Detailed Error. The only way to ensures this is to only generate a detailed error if the request comes from the local machine. As soon as the request is not local, a custom error is generated. Look at the following flow diagram:

Diagram of the Status Substatus, Entity Body, and Set Error's path of creating a detailed error.

Data Flow

First: Error check

The httpError module receives a notification if a response is about to be sent (RQ_SEND_RESPONSE notification). The httpError module checks the status code of this response and immediately returns if the status code is not greater than 400.

Second: Custom Error or Detailed Error

The next check is determined by the request origin (is the request a local or remote request) and the setting of the errorMode property. The errorMode property is set to DetailedLocalOnly, which means that Custom Errors are generated for every remote request. If errorMode is set to «Custom», then all error responses will become Custom Error. If errorMode is set to «Detailed» all error responses will become Detailed Errors. The following table clarifies this behavior:

errorMode Request origin Action
DetailedLocalOnly (default) Local Detailed Error
DetailedLocalOnly (default) Remote Custom Error
Custom Local Custom Error
Custom Remote Custom Error
Detailed Local Detailed Error
Detailed Remote Detailed Error

If the httpError module determines that a Custom Error must be generated, it looks into its configuration to see if it can find a matching error. If a match is found, it sends the static file, redirects the request or executes the URL specified. If no match can be found, IIS send a basic one-line message containing the status code. The next section explains the Custom Error configuration in detail.

If custerr.dll determines that a Detailed Error must be generated, another check is needed. IIS does not touch the response if a module overrode the entity of the response with its own error description. It might contain valuable information. ASP.NET is a good example. The entity of an ASP.NET error response might contain the exception stack and its own error description. A Detailed Error is only generated if the entity body of the response is empty.

<httpErrors> Configuration

Here is the IIS custom error section obtained on a clean install:

[!code-xmlMain]

You see that if the status code of a response is 401, IIS will return a file named 401.htm.

Sub-Status Codes

Many HTTP errors have a sub-status. The IIS default Custom Errors configuration does not differentiate based sub-status codes. It sends the same Custom Error page if you enter the wrong credentials (401.1), or if you get access denied based on invalid rights to access a file (401.3). You can see the different sub-status codes in the log files or via Detailed Errors. Here is a list of the different 404 sub-status codes that IIS produces:

Status Description
404.1 Site could not be found
404.2 Denied by Policy. The request ISAPI or CGI program is not allowed in the Restriction List.
404.3 The static file handler did not have the file in its MimeMap and therefore rejected the request.
404.4 No handler was found to serve the request.
404.5 The Request Filtering Module rejected an URL sequence in the request.
404.6 The Request Filtering Module denied the HTTP verb of the request.
404.7 The Request Filtering module rejected the file extension of the request.
404.8 The Request Filtering module rejected a particular URL segment (characters between two slashes).
404.9 IIS rejected to serve a hidden file.
404.11 The Request Filtering module rejected a request that was double escaped.
404.12 The Request Filtering module rejected a request that contained high bit characters.
404.14 The Request Filtering module rejected a request with a URL that was too long.
404.15 The Request Filtering module rejected a request with a too long query string.
413.1 The Request Filtering module rejected a request that was too long (request + entity body).
431 The Request Filtering module rejected a header that was too long.

You can configure the httpErrors section to show a Custom Error for particular sub-status codes. If you add the following line to the httpErrors configuration section, IIS returns 404_3.htm if a file with a file extension is requested that is not included in the IIS MimeMap (<staticContent> configuration section).

[!code-xmlMain]

Here is how to make the example work:

  1. Add the entry above to your httpErrors configuration section.
  2. Create a file named 404_3.htm in your c:inetpubcusterren-us directory.
  3. Create a file named test.yyy in you c:inetpubwwwroot directory.
  4. Now request http://localhost/test.yyy.

The file extension .yyy is not part of the IIS MimeMap and the static file handler will not serve it.

New in IIS: Language-specific Custom Errors

Each more recent browser includes the language of the client as a request header. Here is an example of how this header might look:

[!code-consoleMain]

The syntax and registry of accepted languages is specified in RFC1766.

When generating an error, IIS takes this header into account when it looks for the custom error file it returns. It generates the path for the custom error using the following logic:

prefixLanguageFilePath configuration setting (for example c:inetpubcusterr)+
Accept-Language header sent by the client (for example en-us) +
Path configuration setting (for example 404.htm)

Example:

If the browser sends a request for an non-existing resource and the «Accept-Language» header has the value of «en-us,» the file that gets returned will be c:inetpubcusterren-us404.htm.

For example, if you are from Germany, you want your error messages in German. To do this, you must install the Windows Vista Language Pack for German. This creates the c:inetpubcusterrde-DE directory with custom error files in it. Now if the browser sends the «Accept-Language» header with the value of «de-DE, the file that gets returned will be c:inetpubcusterrde-DE404.htm.

IIS will always fall back to the system language if the directory «de-DE» does not exist.

[!NOTE]
Internet Explorer allows you to configure the Accept-Language header. Go to «Tools» — «Internet Option», select the «General» tab and click the «Languages» button.

Custom Error Options

In the above examples, IIS sends the contents of the file as the custom error response. IIS has two other ways to respond to an error: by executing an URL or by redirecting the request.

ExecuteUrl

If you want to do more in your custom error, e.g. sending an e-mail or logging the error to a database, you can execute an url. This allows you to execute dynamic content like an ASP.NET page. The example below replaces the 404 custom error. Now IIS executes /404.aspx whenever a 404 error occurs.

[!code-xmlMain]

Security Considerations

A word of caution: For architectural reasons, IIS can only execute the URL if it is located in the same Application Pool. Use the redirect feature to execute a Custom Error in a different Application Pool.

IIS can also return a 302 Redirect to the browser when a particular error occurs. Redirect is good if you have a server farm. For instance, you can redirect all your errors to a central location that you closely monitor.

There is risk however: responseMode=»File» (which is the default) allows you to specify every file on the disk. This will not work if you are very security conscious.

A workable scenario might include only allowing the delegation of the errorMode setting. This enables a developer to receive Detailed Errors for his application even if he is using a remote client. All that is necessary is to set errorMode=»Detailed». Here is how to configure this scenario:

Allow the delegation of the httpErrors section:

[!code-xmlMain]

Second, go to the <httpErrors> section in applicationHost.config and change it so that only errorMode is delegated:

[!code-xmlMain]

Summary

Custom and Detailed Errors are powerful IIS features. They help you to troubleshoot problems without compromising the security of your IIS Server. Many configuration options help you to custom tailor your users’ experience. Most importantly: experimenting with it is fun.

See also

  • Troubleshooting Common IIS Errors

User911049975 posted

 This might have been asked/answered earlier but I’m not getting any results in the search, so asking it.

I’m getting following error while trying to setup a web service on my laptop running Vista and IIS 7.0. Googling and Live search hasn’t help much too. Please help.

**********************************************************************************************************

Server Error


HTTP Error 500.0 — Internal Server Error

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

Error Code: 0x800700b7

Notification: BeginRequest

Module: IIS Web Core

Requested URL:
http://localhost/MyWebService/MyWebService.asmx

Physical Path: E:ProjectsSourceWebrootMyWebServiceMyWebService.asmx

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.

User911049975 posted

 This might have been asked/answered earlier but I’m not getting any results in the search, so asking it.

I’m getting following error while trying to setup a web service on my laptop running Vista and IIS 7.0. Googling and Live search hasn’t help much too. Please help.

**********************************************************************************************************

Server Error


HTTP Error 500.0 — Internal Server Error

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

Error Code: 0x800700b7

Notification: BeginRequest

Module: IIS Web Core

Requested URL:
http://localhost/MyWebService/MyWebService.asmx

Physical Path: E:ProjectsSourceWebrootMyWebServiceMyWebService.asmx

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.

Мы описывали как настраивать веб-публикацию на IIS в инструкции.

Но после настройки веб-публикации при подключении к базе может возникать ошибка “Ошибка HTTP 500.0 — Internal Server Error”.

Если модуль был установлен с 32-битного клиента, то требуется это указать в пуле приложений. Для этого мы делаем следующую настройку:

  • Заходим в Панель управления → Администрирование → Диспетчер служб IIS.
  • Выбираем Пулы приложения которые задействованы в веб-публикации, в нашем случае DefaultAppPool.
  • Нажимаем ПКМ Дополнительные параметры.
  • В строке Разрешены 32-разрядные приложения мы указываем True как на Рисунке 1.
  • Нажимаем ОК.

главная страница

Рисунок 1 — Дополнительные параметры пула приложений

Если не сработало, есть следующие возможные решения:

  1. Убедитесь, что разрешения NTFS для файла web.config верны и обеспечивают доступ к учетной записи компьютера веб-сервера. Заходим в директорию, где размещена публикация (по умолчанию — C:inetpubwwwrootИМЯ_БАЗЫ). Нажимаем ПКМ на web.config → Свойства → Безопасность. Убедитесь в том, что у группы IIS_USERS есть права на чтение, выполнение, запись и изменение файла. Если нет — нажмите кнопку Изменить, в появившемся окне Добавить → Дополнительно и найдите в списке IIS_USERS. Добавьте эту группу и назначьте соответствующие права.
  2. Проверьте журналы событий, чтобы посмотреть, была ли зафиксирована какая-либо дополнительная информация. Открываем Выполнить (ПКМ на кнопку меню пуск или сочетанием клавиш Win+R), вводим “eventvwr.msc”, нажимаем Enter. Возможно, журнал даст подсказку какой компонент может сбоить.
  3. Переустановите компонент IIS на сервере. В диспетчере серверов удалите роль Веб-сервера IIS, перезагрузите сервер, а затем установите заново через оснастку Добавить роли и компоненты.
  4. Установите компонент расширения .NET, если запрос сопоставлен управляемому обработчику.

В Windows Server 2012 и младше: заходим в Диспетчер серверов → Добавить роли и компоненты → Роли сервера → Веб-сервер (IIS) → Веб-сервер → Разработка приложений → Расширяемость .NET. Далее идём далее по указаниям системы.

После применения настроек, мы можем подключаться к настроенной веб-публикации без ошибок.

Нужна готовая настройка веб-доступа к 1С? Попробуйте наш сервер 1С в аренду, в услугу включены все настройки и обслуживание.

Описание ошибки:

Ошибка HTTP 500.0 — Internal Server Error

У разыскиваемого ресурса возникли проблемы, его отображение невозможно.

Подробные сведения об ошибке

Модуль    IsapiModule

Уведомление    ExecuteRequestHandler

Обработчик    1C Web-service Extension

Код ошибки    0x8007007f

Запрашиваемый URL-адрес    http://192.168.0.222:80/1cbase

Физический путь    C:inetpubwwwroot1CBase

Способ входа    Анонимная

Пользователь, выполнивший вход    Анонимная

Наиболее вероятные причины:

У фильтра ISAPI есть зависимости, не доступные на веб-сервере.

Службы IIS получили запрос; однако при его обработке возникла внутренняя ошибка. Основная причина этой ошибки зависит от того, какой модуль обрабатывает запрос и что происходило в рабочем процессе при возникновении ошибки.

Службам IIS не удалось получить доступ к файлу web.config для веб-сайта или приложения. Причиной может быть неправильная настройка разрешений NTFS.

Службам IIS не удалось обработать настройки веб-сайта или приложения.

У прошедшего проверку пользователя нет разрешения на использование этой DLL.

Что можно предпринять:

Попробуйте запустить средство Reskit «depends» в DLL ISAPI.

Убедитесь, что разрешения NTFS для файла web.config верны и обеспечивают доступ к учетной записи компьютера веб-сервера.

Проверьте журналы событий, чтобы посмотреть, была ли зафиксирована какая-либо дополнительная информация.

Проверьте разрешения на использование библиотеки DLL.

Создайте правило трассировки, чтобы отслеживать невыполненные запросы для этого кода состояния HTTP. Чтобы получить дополнительные сведения о создании правила трассировки для невыполненных запросов, щелкните здесь.

Веб-мастеру /
Свой сайт /
Веб-справка

Аннотация

При обращении пользователей к серверу, на котором запущены информационные службы интернета (Internet Information Services, IIS), по протоколу HTTP или FTP (File Transfer Protocol), сервер возвращает число, показывающее состояние выполнения запроса. Данное число называется кодом состояния и сохраняется в журнале служб IIS, а также может отображаться веб-обозревателем или клиентом FTP. Код состояния показывает, выполнен ли запрос, а также может сообщать о причинах сбоя при выполнении запроса.

Дополнительная информация

Местонахождение файла журнала
По умолчанию файлы журналов служб IIS находятся в папке %WIN DIRSystem32 Logfiles. Данная папка содержит отдельные подкаталоги для каждого узла WWW (World Wide Web) и FTP. По умолчанию новый файл журнала создается ежедневно. Имя данного файла формируется, исходя из текущей даты (например exГГММДД.log).
HTTP

1xx — Информационные коды

Перечисленные ниже коды состояния представляют собой предварительные ответы. Перед получением окончательного ответа клиент может получить один или несколько ответов с кодами состояния 1xx.

  • 100 — Следует продолжать работу.
  • 101 — Смена протоколов.

2xx — Запрос принят

Нижеперечисленные коды показывают, что сервер успешно принял запрос клиента.

  • 200 — ОК. Запрос выполнен успешно.
  • 201 — Создан ресурс.
  • 202 — Запрос принят.
  • 203 — Неавторизованные сведения.
  • 204 — Содержимое отсутствует.
  • 205 — Сброс содержимого.
  • 206 — Частичный ответ.

3xx — Перенаправление

Данные коды показывают, что для выполнения запроса необходимо, чтобы в еб-обозреватель клиента выполнил дополнительные действия. Например, может потребоваться, чтобы веб-обозреватель запросил с сервера другую страницу или повторил запрос, используя прокси-сервер.

  • 302 — Объект перемещен.
  • 304 — Объект не изменялся.
  • 307 — Временное перенаправление.

4xx — Ошибка на стороне клиента

Данные коды показывают, что по вине клиента возникла ошибка. Например, клиент мог запросить отсутствующую страницу или не предоставить сведения для проверки подлинности.

  • 400 — Неверный запрос.
  • 401 — Отсутствуют необходимые права доступа. Если возникает ошибка с кодом 401, то службы IIS возвращают расширенный код, указывающий причину ошибки. Это коды отображаются на экране веб-обозревателя, но не регистрируются в журнале служб IIS.
  • 401.1 — Вход в систему не выполнен.
  • 401.2 — Вход не выполнен из-за настройки сервера.
  • 401.3 — Доступ запрещен таблицей управления доступом (ТУД) к ресурсу.
  • 401.4 — Доступ запрещен фильтром.
  • 401.5 — Доступ запрещен приложением ISAPI/CGI.
  • 401.7 – Доступ запрещен политикой авторизации URL веб-сервера. Данный код поддерживается только службами IIS 6.0.
  • 403 — Запрет доступа. Если возникает ошибка с кодом 403, то службы IIS возвращают расширенный код, указывающий причину ошибки.
  • 403.1 — Нет доступа на выполнение.
  • 403.2 — Нет доступа на чтение.
  • 403.3 — Нет доступа на запись.
  • 403.4 — Требуется протокол SSL.
  • 403.5 — Требуется протокол SSL 128.
  • 403.6 — IP-адрес отклонен.
  • 403.7 — Требуется сертификат для клиента.
  • 403.8 — Отказ в доступе к узлу.
  • 403.9 — Подключено слишком много пользователей.
  • 403.10 — Недопусти мая конфигурация.
  • 403.11 — Необходим другой пароль.
  • 403.12 — Отказ доступа от программы сопоставления.
  • 403.13 — Клиентский сертификат отозван.
  • 403.14 — Просмотр каталога запрещен.
  • 403.15 — Достигнуто максимальное число разрешенных одновременных подключений.
  • 403.16 — Клиентский сертификат недействителен или не вызывает доверия.
  • 403.17 — Срок действия клиентского сертификата уже истек или еще не начался.
  • 403.18 — Не удается выполнить запрошенный адрес URL в текущем пуле приложения. Данный код поддерживается только с лужбами IIS 6.0.
  • 403.19 — Не возможно выполнять прило жения CGI для этого клиента в данном пуле приложений. Данный код поддерживается только службами IIS 6.0.
  • 403,20 — Вход систему с помощью служб Passport не выполнен. Данный код поддерживается только службами IIS 6.0.
  • 404 — Объект не найден.
  • 404.0 — (отсутствует) – Файл или каталог не найден.
  • 404.1 — Веб-узел не доступен по запрошенному порту.
  • 404.2 — Запрос отклонен политикой закрытия расширений веб-служб.
  • 404.3 — Запрос отклонен политикой сопоставления MIME.
  • 405 — Для доступа к странице используется недопустимый метод HTTP (недопустимый метод).
  • 406 — Веб-обозреватель клиента на поддерживает тип MIME запрошенной страницы.
  • 407 — Требуется проверка подлинности через прокси-сервер.
  • 412 — Отказ после проверки предварительного условия.
  • 413 – Размер запроса слишком велик.
  • 414 — Слишком длинный запрос URI.
  • 415 – Неподдерживаемый тип носителя.
  • 416 – Значение за пределами диапазона.
  • 417 — Ошибка при выполнении.
  • 423 – Ошибка блокировки.

5xx — Ошибки сервера

Данные к оды показывают, что сервер не может выполнить запрос, поскольку при выполнении возникла ошибка.

  • 500 — Внутренняя ошибка сервера.
  • 500.12 — Приложение в процессе перезапуска.
  • 500.13 — Сервер перегружен.
  • 500.15 — Запросы на файл Global.asa недопустимы.
  • 500.16 – Учетные данные не позволяют выполнить проверку подлинности при подключении к адресу UNC. Данный код поддерживается только службами IIS 6.0.
  • 500.18 – Не удается открыть хранилище данных авторизации URL. Данный код поддерживается только службами IIS 6.0.
  • 500.100 — Внутренняя ошибка ASP.
  • 501 — Значения, указанные в заголовке, требуют нереализованную возможность.
  • 502 — Выполняя роль шлюза или прокси, веб-сервер получил ошибочный ответ.
  • 502.1 — Превышен интервал ожидания ответа от приложения CGI.
  • 502.2 — Ошибка в приложении CGI.
  • 503 — Служба недоступна. Данный код поддерживается только службами IIS 6.0.
  • 504 — Превышен интервал ожидания ответа от шлюза.
  • 505 — Неподдерживаемая версия HTTP.

Основные коды состояния HTTP и их описание

  • 200 — Запрос выполнен успешно. Данный код показывает, что сервер IIS успешно обработал запрос.
  • 304 — Объект не изменялся. Клиент запросил документ, который имеется в кэше клиента и не изменялся после кэширования. Вместо загрузки документа с сервера клиент использует кэшированную копию данного документа.
  • 401.1 — Вход в систему не выполнен. При входе в системе произошел сбой (как правило, вследствие указания ошибочного имени пользователя или пароля).
  • 401.3 — Доступ запрещен списком управления доступом (ACL) к ресурсу. Появление данного кода свидетельствует о проблеме с разрешениями NTFS. Эта ошибка может возникать, даже если для запрашиваемого файла разрешения установлены правильно. Например, данная ошибка появляется, если для учетной записи IUSR отсутствуют права доступа к папке C:WinntSystem32Inetsrv. Дополнительные сведения об устранении данной ошибки см. в следующей статье базы знаний Microsoft:
    187506 Разрешения NTFS и права пользователей, необходимые для работы сервера IIS 4.0
  • 403.1 — Нет доступа на выполнение. Как правило, данная ошибка возникает по следующим причинам.
  • Отсутствует право на выполнение. Например, данная ошибка может возникать при обращении к странице ASP, находящейся в папке, для которой отсутствуют разрешения на выполнение, или при запуске сценария CGI из папки, для которой установлены разрешения «Только сценарии». Чтобы добавить право выполнения, в соответствующей консоли MMC щелкните нужную папку правой кнопкой мыши, выберите пункт Свойства, перейдите на вкладку Каталог и убедитесь, что для требуемых объектов разрешения Разрешен запуск установлены должным образом.
    Используемый метод (например GET или POST) отсутствует в сопоставлении сценариев для требуемого типа файлов. Чтобы проверить, присутствует ли требуемый метод, в соответствующей консоли MMC щелкните нужную папку правой кнопкой мыши, выберите пункт Свойства, перейдите на вкладку Каталог, щелкните команду Конфигурация и убедитесь, ч то в сопоставлении сценариев для требуемого типа файлов разрешено использование соответствующего метода.
  • 403.2 — Нет доступа на чтение. Убедитесь, что в конфигурации служб IIS разрешено чтение из данной папки. Кроме того, если используется документ по умолчанию, убедитесь, что данный документ существует. Дополнительные сведения об устранении данной проблемы см. в следующей статье базы знаний Microsoft:
    247677 Появление сообщения об ошибке «403.2 Запрет доступа. Нет доступа на чтение.»
  • 403.3 — Нет доступа на запись. Убедитесь, что существующие разрешения IIS и разрешения NTFS позволяют выполнять запись в нужную папку. Дополнительные сведения об устранении данной проблемы см. в следующей статье базы знаний Ма й крософт:
    248072 Появление сообщения об ошибке «403.3 Запрет доступа. Нет доступа на запись.»
  • 403.4 — Требуется протокол SSL. Отключите параметр Требует ся безопасный канал или используйте для доступа к данной странице протокол HTTPS, а не HTTP. Если эта ошибка появляется при обращении к веб-узлу, для которого не установлен сертификат, обратитесь к следующей статье базы знаний Microsoft:
    224389 Появление сообщений об ошибках 403, 403.4, 403.5 «Запрет доступа. Требуется протокол SSL.»
  • 403.5 — Требуется протокол SSL 128. Отключите параметр Требуется 12 8 -и разрядное шифрование или используйте для просмотра данной страницы веб-обозреватель, поддерживающий 128-разрядное шифрование. Если эта ошибка появляется при обращении к веб-узлу, для которого не установлен сертификат, обратитесь к следующей статье базы знаний Microsoft: 224389 Появление сообщений об ошибках 403, 403.4, 403.5 «Запрет доступа. Требуется протокол SSL.»
  • 403.6 — IP-адрес отклонен. Конфигурация веб-сервера запрещает доступ с данного IP-адреса. Дополнительные сведения об устранении данной проблемы см. в следующей статье базы знаний Microsoft:
    248043 При подключении к веб-серверу появляется сообщение об ошибке: «Ошибка HTTP 403.6 — Запрет доступа: IP-адрес отклонен»
  • 403.7 — Требуется сертификат для клиента. Конфигурация веб-сервера требует наличие сертификата для выполнения проверки подлинности клиента, однако сертификат для клиента не установлен. Дополнительные сведения см. в следующих статьях базы знаний Майкрософт.
    190004 Появление сообщения об ошибках 403.7 или «Не удается установить соединение с сервером»
    186812 PRB: Появление сообщения об ошибке «403.7 Запрет доступа. Требуется сертификат для клиента.»
  • 403.8 — Отказ в доступе к узлу. Существующие ограничения на доменное имя запрещают доступ к веб-узлу из текущего домена. Дополнительные сведения об устранении данной проблемы см. в следующей статье базы знаний Microsoft:
    248032 Появление сообщения об ошибке «403.8 Запрет доступа. Отказ в доступе к узлу.»
  • 403.9 — Подключено слишком много пользователей. Число пользователей, подключенных к веб-узлу, превысило максимально допустимое число подключений, указанное в конфигурации. Дополнительные сведения об изменении данного значения см. в следующей с тать е базы знаний Майк ро софт:
    248074 Ошибка HTTP 403.9 — Запрет доступа: подключено слишком много пользователей
    Примечание. Microsoft Windows 2000 Professional и Microsoft Windows XP Professional допускают одновременное подключение к службам IIS десяти пользователей. Это значение изменить нельзя.
  • 403.12 — Отказ доступа от программы сопоставления. Для доступа к запрошенной странице необходим сертификат клиента, однако пользователь, сопоставленный используемому клиентскому сертификату, не имеет прав доступа к данному файлу. Дополнительные сведения см. в следующей статье базы знаний Microsoft:
    248075 Появление сообщения об ошибке «403.12 Запрет доступа. Отказ до с тупа от программы сопоставления.»
  • 404 — Объект не найден. Данная ошибка может возникать, если запрошенный файл был удален или перемещен. Кроме того, указанное сообщение об ошибке появляется, если после установки средства URLScan был ограничен доступ к файлам с запрошенным расширением. В этом случае в файле журнала для данного запроса будет добавлена строка «Rejected by URLScan».
  • 500 — Внутренняя ошибка сервера. Данное сообщение об ошибке может появляться вследствие различных причин. Дополнительные сведения о причинах подобных ошибок могут помещаться в журнал событий. Кроме того, для получения полного описания ошибки можно отключить вывод подробных сообщений об ошибках HTTP. Дополнительные сведения об отключении вывода подробных сообщений об ошибках HTTP см. в следующей статье базы знаний Microsoft:
    294 807 Отключение параметра «Выводить подробные сообщения об ошибках http» в обозревателях Internet Explorer 5.x и 6.x на стороне сервера
  • 500.12 — Приложение в процессе перезапуска. Данное сообщение появляется при попытке загрузить страницу ASP в то время, когда сервер IIS перезапускает приложение. После обновления страницы данное сообщение должно исчезнуть. Если после обновления страницы указанное сообщение остается, то это может быть вызвано работой антивирусной программы, которая проверяет файл Global.asa. Дополнительные сведения см. в следующей статье базы знаний Microsoft:
    248013 Сообщение «Ошибка HTTP 500-12 Перезапуск приложения» при подключении к Microsoft Internet Information Services 5. 0
  • 500-100.ASP — Внутренняя ошибка ASP. Данное сообщение об ошибке появляется при загрузке страницы ASP, содержащей ошибки. Чтобы получить более полную информацию о данной ошибке, отключите вывод подробных сообщений об ошибках HTTP. По умолчанию данная ошибка может появляться только на веб-узле по умолчанию. Дополнительные сведения о том, как увидеть данную ошибку на веб-узлах, не являющихся узлами по умолчанию, см. в следующей статье базы знаний Microsoft:
    261200 Вместо сообщения об ошибке из файла 500-100.asp отображается сообщение об ошибке HTTP с кодом 500
  • 502 — Неправильный шлюз. Данное сообщение об ошибке появляется при запуске сценария CGI, не возвращающего соответствующий набор заголовков HTTP.

FTP

1xx — Положительный предварительный ответ

Данный код состояния говорит о том, что выполнение действия началось успешно, но перед переходом к новой команде клиент должен дождаться следующего ответа.

  • 110 Значение маркера повторного запуска.
  • 120 Служба будет готова через ххх минут.
  • 125 Соединение для передачи данных уже уст ановл ено; передача данных начата.
  • 150 Состояние файла проверено. Сервер готов к установке соединения для передачи данных.

2xx — Оповещение о выполнении команды

Действие завершилось успешно. Клиент может выполнять следующую команду.

  • 200 Команда выполнена успешно.
  • 202 Команда не реализована. На данном узле команда не требуется.
  • 211 Состояние системы или справка по системе.
  • 212 Состояние каталога.
  • 213 Состояние файла.
  • 214 Справочное сообщение.
  • 215 ИМЯ тип системы, где ИМЯ — официальное имя системы в соответствии с документом о присвоении номеров.
  • 220 Система готова обслуживать нового пользователя.
  • 221 Служба разрывает управляющее соединение. Если необходимо, будет произведен выход из системы.
  • 225 Соединение для передачи данных установлено; передача не выполняется.
  • 226 Соединение для передачи данных разрывается. Требуемое действие выполнено (например пере дача или прекращение передачи файла).
  • 227 Выполняется вход в пассивный режим (h1,h2,h3,h4,p1,p2).
  • 230 Пользователь вошел в систему. Производится обработка.
  • 250 Требуемое действие завершено успешно.
  • 257 Создана папка «ПУТЬ».

3xx — Положительные промежуточные ответы

Данные коды состояния говорят о том, что команда выполнена успешно, но для завершения выполнения запроса клиент должен передать серверу дополнительные сведения.

  • 331 Имя пользователя получено. Необходимо ввести пароль.
  • 332 Необходима учетная запись для входа в систему.
  • 350 Для выполнения запрашиваемого действия требуются дополнительные данные.

    4xx — Промежуточные отрицательные ответы

    При выполнении команды возникла временная ошибка. Если клиент повторит команду, она может выполниться успешно.

    • 421 Служба недоступна. Управляющее соединение разрывается. Данное сообщение может отправляться в ответ на какую-либо команду, если служба должна завершить работу.
    • 425 Не удается установить соединение для передачи данных.
    • 426 Соединение разорвано; передача прекращена.
    • 450 Требуемое действие не выполнено. Файл недоступен (например, файл может быть занят).
    • 451 Выполнение требуемого действия прервано: при выполнении возникла ошибка.
    • 452 Требуемое действие не выполнено. Системе не хватает места на диске.

    5xx — Окончательные отрицательные ответы

    При выполнении команды возникла ошибка. Данная ошибка носит постоянный характер. Если клиент повторит команду, при ее выполнении возникнет такая же ошибка.

    • 500 Синтаксическая ошибка. Команда не распознана. Одной из причин возникновения этой ошибки является использование слишком длинных команд.
    • 501 Синтаксическая ошибка в аргументах или параметрах.
    • 502 Команда не реализована.
    • 503 Ошибочная последовательность команд.
    • 504 Для данного параметра команда не реализована.
    • 530 Не выполнен вход в систему.
    • 532 Необходима учетная запись для сохранения файлов.
    • 550 Требуемое действие не выполнено. Файл недоступен (например, файл не найден или нет доступа к файлу).
    • 551 Выполнение требуемого действия прервано. Неизвестный тип страницы.
    • 552 Выполнение требуемого действия прервано. Превышен максимально допустимый объем места на диске (в текущей папке или в наборе данных).
    • 553 Требуемое действие не выполнено. Недопустимое имя файла.

    Основные коды состояния FTP и их описание

    • 150 — Протокол FTP использует два порта: порт 21 для передачи команд и порт 20 для передачи данных. Код состояния 150 показывает, что сервер собирается установить новое соединение на порту 20 для передачи данных.
    • 226 — Команда устанавливает подключение к порту 20, чтобы выполнить какие-либо действия (например передать файл). Данное действие было завершено успешно. Соединение разорвано.
    • 230 — Сообщение с этим кодом появляется после отправки клиентом правильного пароля. Данный код состояния показывает, что пользователь вошел в систему.
    • 331 — Сообщение с этим кодом появляется после отправки клиентом имени пользователя. Это сообщение появляется независимо от того, присутствует ли в системе указанное имя пользователя.
    • 426 — Команда устанавливает подключение к порту 20, чтобы выполнить какие-либо действия, однако выполнение действия было отменено и соединение было разорвано.
    • 530 — Данный код состояния показывает, что пользователь не может войти в систему, поскольку введена ошибочная комбинация имени пользователя и пароля. Если для входа в систему используется учетная запись пользователя, то данное сообщение может появляться, если имя пользователя или пароль введены неправильно или если в систем у могут входить только анонимные пользователи. Если для входа в систему используется анонимная учетная запись, то данное сообщение может появляться, если сервер IIS не поддерживает вход анонимных пользователей.
    • 550 — Команда не выполнена, поскольку требуемый файл недоступен. Данное сообщение может появляться при попытке получить отсутствующий файл с помощью команды GET, при использовании команды PUT для сохранения файла в папке, для которой отсутствует право записи, а также в некоторых других случаях.

I know that similar questions have been asked but their answer are not solving my problem.

HTTP Error 500.19 — Internal Server Error

The requested page cannot
be accessed because the related configuration data for the page is
invalid.
Detailed Error Information: Module IIS Web Core Notification BeginRequest Handler Not yet determined Error Code 0x80070021
Config Error This configuration section cannot be used at this
path. This happens when the section is locked at a parent level.
Locking is either by default (overrideModeDefault=»Deny»), or set
explicitly by a location tag with overrideMode=»Deny» or the legacy
allowOverride=»false».

Config File ?C:mySiteweb.config

Requested URL http://localhost:80/mySite/login

Physical Path C:mySitelogin

Logon Method Not yet determined

Logon User Not yet determined

Config Source:

65: </staticContent>

66: <handlers>

67:

<add name="ReportViewerWebControlHandler"
    > preCondition="integratedMode" verb="*"
    > path="Reserved.ReportViewerWebControl.axd"
    > type="Microsoft.Reporting.WebForms.HttpHandler,
    > Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral,
    > PublicKeyToken=b03f5f7f11d50a3a" />

I checked in Windows features also and they look alright.

I’ve tried to set overrideModelDefault to Allow and to remove WebServiceHandlerFactory from applicationhost.congif but no result.

I’m using Visual Studio 2017 and IIS 10.

Any other ideas how to solve this?

Ali Bayat's user avatar

Ali Bayat

3,4812 gold badges42 silver badges43 bronze badges

asked Jul 31, 2017 at 12:22

Samurai Jack's user avatar

Samurai JackSamurai Jack

2,9558 gold badges34 silver badges58 bronze badges

4

  1. Press Win Key+R to Open Run Window
  2. in the Run Window, enter «OptionalFeatures.exe»
  3. in the features window, Click: «Internet Information Services»
  4. Click: «World Wide Web Services»
  5. Click: «Application Development Features»
  6. Check the features.

I’m using Windows 10

Note: «You must be signed in as an administrator
to be able to turn Windows features on or off.» If Windows Features is
empty or blank, then double-check to make sure that the Windows
Modules Installer service is enabled and set to Automatic.

Update:

Make sure .NET Core Windows Server Hosting bundle is installed

Other possible solutions:

Solution 1:

Run these two commands from an elevated command prompt

%windir%/system32/inetsrv/appcmd unlock config /section:anonymousAuthentication

%windir%/system32/inetsrv/appcmd unlock config -section:windowsAuthentication

Solution 2: Using PowerShell

Install-WindowsFeature NET-Framework-Core
Install-WindowsFeature Web-Server -IncludeAllSubFeature
Install-WindowsFeature NET-Framework-Features -IncludeAllSubFeature
Install-WindowsFeature NET-Framework-47-ASPNET -IncludeAllSubFeature
Install-WindowsFeature Application-Server -IncludeAllSubFeature
Install-WindowsFeature MSMQ -IncludeAllSubFeature
Install-WindowsFeature WAS -IncludeAllSubFeature

Solution 3: Removing the <rewrite> tag in web.config

<system.webServer>
    ...
    <rewrite>
    ...
    </rewrite>
</system.webServer>

answered Sep 5, 2017 at 7:14

Ali Bayat's user avatar

1

For me, the problem was a redirection rule in web.config.

Solved by removing the entire <rewrite>-tag in web.config:

<system.webServer>
...
...
<rewrite>
      <rules>
        <rule name="http to https" enabled="true" stopProcessing="true">
          <match url="(.*)"/>
          <conditions>
            <add input="{HTTPS}" pattern="^OFF$"/>
          </conditions>
          <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" appendQueryString="true"/>
        </rule>
      </rules>
    </rewrite>
 </system.webServer>

answered Jun 27, 2018 at 15:33

Sha's user avatar

ShaSha

2,1651 gold badge35 silver badges60 bronze badges

1

It’s no problem in web.config file.

After installation windows, 
IIS does not know how to support .NET Core 2.0 website (or Core 1.0 also) by default

You must to install the .NET Core Windows Server Hosting bundle on the hosting system.

answered Feb 1, 2018 at 14:09

Newred's user avatar

NewredNewred

6898 silver badges8 bronze badges

0

I suddenly started getting this error out of blue when launching debug of ASP.NET project in IIS Express from VisualStudio. While (re)examining the file .vsconfigapplicationhost.config I noticed the following suspicious line:

<virtualDirectory path="/" physicalPath="C:UsersmeOneDriveDocumentsMy Web Sitesproject.Web-Site2" />

I would never consciously use OneDrive for anything related to development. But our IT is in the process of adopting OneDrive organization wide. So they probably changed some settings of my profile that caused VisualStudio to update IIS Express config with that path. And «My Web Sites» directory did not exist there. So after I updated the line as following:

<virtualDirectory path="/" physicalPath="C:inetpubwww" />

and created the directory empty C:inetpubwww, everything started to work again.

Hope this story may save someone few wasted troubleshooting hours.

answered Sep 16, 2021 at 22:01

vldmr-bus's user avatar

I faced this problem. For me putting the connection string after configSections which contained the entityframework section, solved the problem.

answered Sep 10, 2018 at 9:15

Golnaz Saraji's user avatar

Golnaz SarajiGolnaz Saraji

1541 gold badge3 silver badges14 bronze badges

I had used the wrong framework. I had chosen .NET 3.5 in my project properties. After changing that to .NET 4 the problem was gone. .NET 4 is the only framework that can be chosen in my IIS 10 version.

answered Aug 18, 2019 at 0:52

Marketman's user avatar

This could be a Web.config file sharing problem.
Check if the wwwroot folder is shared, and also check the
folder which contains publish/build inside.

goodmami's user avatar

goodmami

96215 silver badges26 bronze badges

answered Sep 23, 2020 at 6:37

Akhil M's user avatar

Make sure to install the appropriate Hosting Bundle after enabling IIS

In my case:

  1. Installed Hosting Bundle
  2. Enabled IIS

and got this unhappy message:

HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid

Reinstalling Hosting Bundle solved the problem

answered Aug 26, 2022 at 5:38

Maruf's user avatar

MarufMaruf

3443 silver badges8 bronze badges

  • 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

  • Remove From My Forums
  • Question

  • User135423268 posted

    Good Day Everyone

    I’m having an error after I deploy my ASP.Net Core MVC website, I follow the instructions on this website

    https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-3.1 and also on this youtube channel
    https://www.youtube.com/watch?v=Q_A_t7KS5Ss but I’m still having the error below.

    HTTP Error 500.19 — Internal Server Error

    The requested page cannot be accessed because the related configuration data for the page is invalid.

    <fieldset>

    Detailed Error Information:

    Module    IIS Web Core
    Notification    Unknown
    Handler    Not yet determined
    Error Code    0x8007000d
    Config Error    
    Config File    \?C:Websiteseappsadminweb.config
    Requested URL    http://localhost:10003/
    Physical Path    
    Logon Method    Not yet determined
    Logon User    Not yet determined

    </fieldset>

    <fieldset>

    Config Source:

       -1: 
        0: 

    I don’t know what to do, I’m losing hope and might try to migrate my system back to .Net Framework.

    </fieldset>

Answers

  • User-1330468790 posted

    Hi amendoza29,

    Since you post that you have followed the guidance, could you please confirm that you have completed following steps: 

    • Enable the Web Server (IIS) server role and establish role services.
    • Install the
      .NET Core Hosting Bundle
    • Install
      Web Deploy when publishing with Visual Studio

    If you confirm that you have prepared all above necessary component for hosting the asp.net core website, the next step is to check if you have access to the web.config file.

    • Ensure that the Identity is set to use ApplicationPoolIdentity. 
    • Then check if the publish folder has granted permission to the
      application pool. (following below steps) 

    Regarding how to check and grant permission:

    1. Open Windows Explorer
    2. Select the directory for the publish folder where the web.config locates
    3. Right click the directory and select Properties
    4. Select the Security tab
    5. Check if the application pool has been in the list of the group and users.
    6. If not, then add
    7. Click the Edit button and then Add button
    8. Click the Locations button and make sure that you select your computer.
    9. Enter IIS AppPool<myappoolname> in the Enter the object names to select: text box.
    10. Click the Check Names button and click OK.
    11. Check Modify under the Allow column, and click OK, and OK.

    I could not provide one-shot solution so that we are trying to narrow down the problem and target it.

    If you have tried above suggestions with no luck, feel free to let me know.

    Best regards,

    Sean

    • Marked as answer by

      Thursday, October 7, 2021 12:00 AM

Мы описывали как настраивать веб-публикацию на IIS в инструкции.

Но после настройки веб-публикации при подключении к базе может возникать ошибка “Ошибка HTTP 500.0 — Internal Server Error”.

Если модуль был установлен с 32-битного клиента, то требуется это указать в пуле приложений. Для этого мы делаем следующую настройку:

  • Заходим в Панель управления → Администрирование → Диспетчер служб IIS.
  • Выбираем Пулы приложения которые задействованы в веб-публикации, в нашем случае DefaultAppPool.
  • Нажимаем ПКМ Дополнительные параметры.
  • В строке Разрешены 32-разрядные приложения мы указываем True как на Рисунке 1.
  • Нажимаем ОК.

главная страница

Рисунок 1 — Дополнительные параметры пула приложений

Если не сработало, есть следующие возможные решения:

  1. Убедитесь, что разрешения NTFS для файла web.config верны и обеспечивают доступ к учетной записи компьютера веб-сервера. Заходим в директорию, где размещена публикация (по умолчанию — C:inetpubwwwrootИМЯ_БАЗЫ). Нажимаем ПКМ на web.config → Свойства → Безопасность. Убедитесь в том, что у группы IIS_USERS есть права на чтение, выполнение, запись и изменение файла. Если нет — нажмите кнопку Изменить, в появившемся окне Добавить → Дополнительно и найдите в списке IIS_USERS. Добавьте эту группу и назначьте соответствующие права.
  2. Проверьте журналы событий, чтобы посмотреть, была ли зафиксирована какая-либо дополнительная информация. Открываем Выполнить (ПКМ на кнопку меню пуск или сочетанием клавиш Win+R), вводим “eventvwr.msc”, нажимаем Enter. Возможно, журнал даст подсказку какой компонент может сбоить.
  3. Переустановите компонент IIS на сервере. В диспетчере серверов удалите роль Веб-сервера IIS, перезагрузите сервер, а затем установите заново через оснастку Добавить роли и компоненты.
  4. Установите компонент расширения .NET, если запрос сопоставлен управляемому обработчику.

В Windows Server 2012 и младше: заходим в Диспетчер серверов → Добавить роли и компоненты → Роли сервера → Веб-сервер (IIS) → Веб-сервер → Разработка приложений → Расширяемость .NET. Далее идём далее по указаниям системы.

После применения настроек, мы можем подключаться к настроенной веб-публикации без ошибок.

Нужна готовая настройка веб-доступа к 1С? Попробуйте наш сервер 1С в аренду, в услугу включены все настройки и обслуживание.

  • При обработке заказа произошла ошибка повторите попытку позже
  • При обработке дробных чисел на компьютере могут накапливаться ошибки верно ли
  • При обработке данных произошла ошибка эпик геймс
  • При обработке данных полученных от сторонней системы авторизации произошла ошибка epic games
  • При обработке вашего запроса произошла ошибка стим смена пароля