2

I know the original purpose of

<add key="enableSimpleMembership" value="false" />

was to address ASP.NET MVC3 Known Issues that setting the value in forms configuration is ignored on MVC3. This leaves me with 3 specific questions.

  1. Is this also true for MVC4?
  2. Is this appSetting going to be the supported way to configure this going forward?
  3. One last question that heavily depends on these questions, can MVC3+ apps stop using the loginUrl attribute on the forms configuration node altogether?

1 Answer 1

3
+100
  1. No
  2. SimpleMembership in MVC4.
  3. By default it uses something. If you don't specify the loginUrl, it would then redirect unauthorized access to /login.aspx?ReturnUrl=OriginalDestination. If you want to disable the authentication all together, you could put the following in your web.config.
<system.web>
  <authorization>
    <allow users="*"/>
  </authorization>
</system.web>
Sign up to request clarification or add additional context in comments.

5 Comments

Assuming enableSimpleMembership is false. In MVC4 the appSettings value of loginUrl is not needed for any reason?
It is not needed in the appSettings. It should be taken care of in the forms authentication section.
@ChrisMarisic has this been helpful and answered your question?
I see MVC4 defaults to simple membership, are there any other opt out methods than that appsettings? I have nuget packages that configure SSO forms auth and nuget just doesn't handle sharing configuration well so i try to keep as little xml configuration as possible, but with MVC3 i had to add a bunch more to it
I'm not aware of another way unfortunately.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.