ASP.Net Web应用程序安全性在IIS 7上不起作用?
我正面临一个棘手的问题 我在win server 2008上使用visual studio 2010、SQL express 2008 运行安全向导(创建单个用户,设置权限,如拒绝匿名和允许创建的用户)并按F5-->键后,站点工作正常 当我将文件夹移动到IIS 7并“转换为应用程序”时,会出现登录页面,但它不会接受我提供的密码 有人告诉我,只有天才才会回答这个问题 我使用的是.Net 4,管理的pipleine模式-->内联 IIS设置: 匿名身份验证。-->启用 表单验证。-->启用 ASP.Net模拟、基本身份验证、摘要身份验证、Windows身份验证-->已禁用 web.configASP.Net Web应用程序安全性在IIS 7上不起作用?,asp.net,sql,security,iis-7,web-config,Asp.net,Sql,Security,Iis 7,Web Config,我正面临一个棘手的问题 我在win server 2008上使用visual studio 2010、SQL express 2008 运行安全向导(创建单个用户,设置权限,如拒绝匿名和允许创建的用户)并按F5-->键后,站点工作正常 当我将文件夹移动到IIS 7并“转换为应用程序”时,会出现登录页面,但它不会接受我提供的密码 有人告诉我,只有天才才会回答这个问题 我使用的是.Net 4,管理的pipleine模式-->内联 IIS设置: 匿名身份验证。-->启用 表单验证。-->启用 ASP.
<configuration>
<connectionStrings>
<add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<authorization>
<deny users="?"/>
<allow users="statmaster"/>
</authorization>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0"/>
<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="2880"/>
</authentication>
<membership>
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
</providers>
</membership>
<profile>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
</providers>
</profile>
<roleManager enabled="false">
<providers>
<clear/>
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/>
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/>
</providers>
</roleManager>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
用户名存在于aspnet_用户表中,用户名在aspnet_成员表中“加密”阅读本文
尝试创建一个新网站,并将应用程序组件放在case web.config application name=“/”的根目录中
我希望这能解决它
<membership>
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="LocalSqlServer"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
requiresUniqueEmail="false"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="7"
minRequiredNonalphanumericCharacters="1"
passwordAttemptWindow="10"
passwordStrengthRegularExpression=""
applicationName="/"
/>
</providers>
</membership>
您在虚拟目录上设置了什么身份验证?你在web.config中指定了什么身份验证?@slugster:检查我的editLook我不确定,但既然你问这个问题已经4个小时了,仍然没有一个答案,那么我建议你尝试给我们更多的信息,因为我不能指出任何东西(不是声称自己是专家!)。检查IIS和站点的日志。答案显然在某个地方。@Poni:请检查mokokamello的答案,当我将应用程序复制到根文件夹中时,它对我有效,但当我将其放入“website1”这样的文件夹时,它对我无效。请检查mokokamello答案链接中的文章并告诉我你的意见。