在IIS虚拟目录的根目录中的web.config中的配置文件如下:
<?xml version="1.0" encoding="gb2312"?>
<configuration>
<location path="manage"> //配置子目录manage中应用如下选项
<system.web>
<compilation defaultLanguage="c#" debug="true" />
<customErrors mode="Off" />
<authentication mode="Forms">
//这里报错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.
<forms loginUrl="default.aspx" path="manage" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
<trace enabled="true" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
<globalization requestEncoding="gb2312" responseEncoding="gb2312" />
</system.web>
</location>
<system.web>
<sessionState cookieless="true" timeout="100" />
</system.web>
<appSettings>
<add key="sqlConnectionString" value="server=localhost;uid=sa;pwd=;database=fdc" />
</appSettings>
</configuration>