Войти

Показать полную графическую версию : Ошибка в web.config файле


Raziya
17-02-2010, 15:45
Как ее исправить??? Когда я открываю сайт (локальный в домене офиса) на главной машине он выдает такую ошибку:


Server Error in '/' Application.
--------------------------------------------------------------------------------

Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed.

Details: To enable the details of this specific error message to be viewable on the local server machine, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "RemoteOnly". To enable the details to be viewable on remote machines, please set "mode" to "Off".


<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="RemoteOnly"/>
</system.web>
</configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.


<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="On" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>



А через другой комп такую:

Server Error in '/' Application.
--------------------------------------------------------------------------------

Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".


<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.


<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>

Delirium
18-02-2010, 01:00
Мда, видимо, текст вы не переводили написанный. Ошибка вовсе не в файле конфигурации. Данный текст сообщает, что текущие настройки конфигурации не позволяют отобразить данные об ошибке. Чтобы увидеть саму ошибку, надо в файле web.config прописать строку

<customErrors mode="Off"/>
Также желательно в оснастке IIS в свойствах виртуального каталога сайта включить подробные сообщения об ошибке с отображением на сервере и на клиенте.

Raziya
18-02-2010, 08:43
Это портал на SharePoint.
Я сделала <customErrors mode="Off"/> и теперь выдает такую ошибку и там и там:


Server Error in '/' Application.
--------------------------------------------------------------------------------

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Data at the root level is invalid. Line 1, position 1.

Source Error:


Line 1: <browsers>
Line 2: <browser id="Safari2" parentID="Safari1Plus">
Line 3: <controlAdapters>


Source File: /App_Browsers/compat.browser Line: 1


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053



Все работало нормально, я ничего не меняла, из-за чего она появилась там я не понимаю.

Delirium
18-02-2010, 09:30
В каком браузере просматривается? В других пробовали?

Raziya
18-02-2010, 10:22
IE, Opera, FireFox - это те что я видела.

apelsinchik
18-03-2011, 23:52
У меня была такая же проблема при просмотре одного сайта.
Решил проблему установив на рабочую станцию (Win Xp sp3) Дистрибутивный пакет Microsoft .NET Framework 2.0 (x86) Тут (http://www.microsoft.com/downloads/ru-ru/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5)
После перезагрузки всё заработало.




© OSzone.net 2001-2012