web.config中错误

Server Error in '/' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:

Line 42: <add assembly="CrystalDecisions.ReportAppServer.Controllers, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></assemblies>



Line 43: </compilation>



Line 44: <authentication mode="Windows"/>
Line 45: <!--<identity impersonate="true"/>-->

Line 46:                   <customErrors mode="Off" defaultRedirect="~/en/login.asp">

Source File: c:"inetpub"wwwroot"promis"web.config    Line: 44

  It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. (c:"inetpub"wwwroot"promis"web.config line 44)

最近我们的网站偶尔会出现上面的错误。

我整理了一下出现这个错误的解决方案:

1。 在iis中项目文件夹设定为虚拟目录   

  在iis下找到项目文件夹属性->目录->应用程序设置处   点击   创建 

2。 在站点下面有多个配置文件(web.config)。

    删除子目录中的多余文件。

3。 如何配置应用程序的身份验证策略。

    a、启动互联网信息服务(IIS)。
    b、右键点击你的应用虚拟目录,然后单击属性。
c、点击这个目录安全标签。
    d、在匿名访问控制和认证,点击编辑。

  e、确保匿名访问复选框是未被选中,集成的windows认证被选择。(如果是asp和asp.net混合的站点,那么匿名访问也必须被选择。)

    f、 web.config需要<authentication mode="Windows"/>

To resolve this issue you would have to open the main .SLN file in notepad and replace the sections:

Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "C:"..."MySite"", "C:"Inetpub"wwwroot"MySite",

 with

Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "http://localhost/MySite/", "http://localhost/MySite",

and also if missing, add


  SlnRelativePath = "c:"inetpub"wwwroot"MySite""

4. 虚拟目录的权限需要设置ASPNET, IIS匿名, NetWork Service三个用户的权限。

 

转载于:https://www.cnblogs.com/lfzwenzhu/archive/2009/04/29/1446179.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值