我有一個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