我有一个ASP.NET MVC 1 Web应用程序使用ASP.NET成员资格提供程序。在我的本地框中,当我向表单提交数据时,重定向将它带到适当的位置(使用Controller.RedirectToRoute)。在它应该居住的服务器上,表单提交将我带回登录页面。数据正确发布,但我只是错误地重定向。表单提交返回登录屏幕
我记得几年前(在一个非MVC应用程序中)处理这个问题,这是由于Web.Config相对于成员资格提供程序的问题。
我无法想象我是唯一有这个问题的人。我应该在我的web.config中寻找可能与此有关的东西?
提前致谢。
编辑
这里是web.config中的我的认证和会员部:
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" timeout="2880" />
</authentication>
<membership>
<providers>
<clear />
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" applicationName="IPS" />
</providers>
</membership>
<profile>
<providers>
<clear />
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="ApplicationServices" applicationName="IPS" />
</providers>
</profile>
<roleManager enabled="true">
<providers>
<clear />
<add connectionStringName="ApplicationServices" applicationName="IPS" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add applicationName="IPS" name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</roleManager>
我发现了比我在这里提到的更深的问题。这个问题现在已经过时了。这里是我基于我在事件日志中发现的新问题:http://stackoverflow.com/questions/5810982/mvc-1-and-iis-7-error-code-4011 – 2011-04-27 21:44:49