asp.net - 在 IIS 中配置 ASP.NET 应用程序

标签 asp.net iis iis-6 web-config

我继承了一些 aspx(包括 web.config 文件)并收到以下错误。我已经为其创建了一个虚拟目录,但我不确定如何“将其配置为应用程序”?

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 49:             ASP.NET to identify an incoming user. 
Line 50:         -->
Line 51:        <authentication mode="Windows"/>
Line 52: 
Line 53:     <customErrors mode="Off"/>


Source File: C:\<MYPATH>\web.config    Line: 51 

最佳答案

进入虚拟目录的属性,单击“虚拟目录”选项卡,然后单击“应用程序设置”下的“创建”按钮,然后将“执行权限”设置为“仅限脚本”

另请检查 ASP.NET 选项卡,确保其设置为适合您的应用的正确版本。

最后,确保用于虚拟目录的应用程序池仅由使用相同版本 ASP.NET 的其他站点和虚拟目录使用。

关于asp.net - 在 IIS 中配置 ASP.NET 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/470136/

相关文章:

apache - IIS 相当于 Apache 中的 VirtualHost

c# - 当文件上传超过 ASP.NET MVC 中允许的大小时显示自定义错误页面

iis-6 - 如何以编程方式检查IIS6 Web服务扩展中是否“允许” ASP.NET?

iis-7 - 使用 **SUBST cmd** 创建的文件夹不适用于 IIS 6

asp.net - 有谁知道 Windows Azure WebResource.axd 时区错误的解决方法?

c# - ASP.NET mvc html 列显示

c# - PageMethod URL 正在重写并且在 IIS5.1 下处理不当。是否有不包括创建 WebService 的修复程序?

c# - IIS Express 与 dotnet 运行

asp.net - 处理样式表

javascript - 获取 URL 字符串形式的报告参数