在IIS中配置应用程序时出错

时间:2012-02-03 07:01:15

标签: asp.net .net iis

这是我的web.config文件......

<?xml version="1.0" encoding="UTF-8"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration> 
    <system.web>
        <compilation debug="true" targetFramework="4.0" />
    <authentication mode="Forms">     
    </authentication>               
    </system.web>
    <system.webServer>
        <modules runAllManagedModulesForAllRequests="true" />
        <directoryBrowse enabled="true" />
    </system.webServer>
</configuration>

当我试图托管我的应用程序时收到错误..

在应用程序级别之外使用注册为allowDefinition ='MachineToApplication'的部分是错误的。此错误可能是由于虚拟目录未在IIS中配置为应用程序。

由于

1 个答案:

答案 0 :(得分:1)

检查应用程序池是否已使用asp.net 4.0进行设置 确保IIS中的网站(或虚拟目录)是一个应用程序,而不仅仅是一个文件夹;右键单击将为您提供相关选项

相关问题