我继承了一些 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/