【问题标题】:ASP.Net wont launch - IIS error because it's not in root?ASP.Net 无法启动 - IIS 错误,因为它不在根目录中?
【发布时间】:2013-05-09 20:59:18
【问题描述】:

我有一个已从 SVN 签出的 ASP.Net 解决方案。我已将其保存在c:\inetpub\solution-name\ 下。我要启动的文件位于c:\inetpub\solution-name\trunk\project-name\Default.aspx。当我通过浏览器http://localhost/solution-name/trunk/project-name/ 访问它时,我收到以下错误:

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 253:      </controls>
Line 254:    </pages>
Line 255:    <roleManager enabled="true" cacheRolesInCookie="true" defaultProvider="AspNetSqlRoleProvider">
Line 256:      <providers>
Line 257:        <clear/>

我认为问题可能与文件的目录结构有关。我不想更改结构,因为我需要能够在inetpub 等下拥有多个解决方案。

是否有 IIS 配置来解决此问题?

【问题讨论】:

    标签: asp.net iis iis-7.5


    【解决方案1】:

    您需要在 IIS 中为每个 Asp.Net 项目创建一个虚拟目录。此外,如果您使用的是 IIS7+,您可以右键单击文件夹并单击“转换为应用程序”。要创建虚拟目录,您可以在 IIS 中右键单击该网站,然后选择“添加虚拟目录”。

    【讨论】:

    • 我尝试Add Virtual Directory。我输入了AliasPhysical path:(我不确定这应该是什么,但我将它指向了我的默认项目的文件夹)。当我点击Test Settings时,Authentication似乎已经过去了,但是Authorization返回了这个:
    • "服务器配置为使用内置帐户的透传身份验证来访问指定的物理路径。但是,IIS 管理器无法验证内置帐户是否具有访问权限。请确保应用程序池标识对物理路径具有读取访问权限。如果此服务器已加入域,并且应用程序池标识是 NetworkService 或 LocalSystem,请验证 \$ 是否具有对物理路径的读取访问权限。然后再次测试这些设置。”
    猜你喜欢
    • 1970-01-01
    • 2016-06-10
    • 2014-02-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-11-12
    • 1970-01-01
    • 2012-03-13
    相关资源
    最近更新 更多