web.config中用户验证问题
我在web.config配置文件中有如下配置:
<authentication mode="Forms">
<forms name="loginForm" loginUrl="LoginPage.aspx" protection="All" timeout="15" path="/"></forms>
</authentication>
<profile enabled="true" defaultProvider="sqlserver" automaticSaveEnabled="true">
<properties>
<add name="Login" type="MODEL.Login" allowAnonymous="true" />
</properties>
<providers>
<add name="sqlserver" type="System.Web.Profile.SqlProfileProvider" connectionStringName="sql"/>
</providers>
</profile>
<anonymousIdentification enabled="true"/>
,网站做好后,在本地运行都没问题,发布到服务器上后,访问该网站就出现了如下错误:
在应用程序级别之外使用注册为 allowDefinition='MachineToApplication' 的节是错误的。如果在 IIS 中没有将虚拟目录配置为应用程序,则可能导致此错误。
Line 19: </connectionStrings>
Line 20: <system.web>
Line 21: <authentication mode="Forms">
Line 22: <forms name="loginForm" loginUrl="LoginPage.aspx" protection="All" timeout="15" path="/"></forms>
Line 23: </authentication>
各位帮帮忙,很急
最好有具体解决的方案,谢谢