Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9218945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:59:01+00:00 2026-06-18T02:59:01+00:00

I migrated from MVC 2 to MVC 4. I use the Facebook Javascript API

  • 0

I migrated from MVC 2 to MVC 4. I use the Facebook Javascript API for authentication, so the user logs in via Facebook and I just get their Facebook Id. If their Facebook login attempt was successful, in MVC 2, I simply did this to log them into my site, so that they can access methods which have the [Authorize] attribute:

FormsService.SignIn(user.UserName, true);

Now after moving to MVC 4, my Facebook login process still works fine, but even after doing a FormsService.SignIn, the user does not seem to be authenticated. HttpContext.User.identity.IsAuthenticated is false. And as a result, they cannot access methods with the [Authorize] attribute.

My MVC 4 web.config looks like this:

<profile defaultProvider="DefaultProfileProvider">
  <providers>
    <add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/" />
  </providers>
</profile>
<membership defaultProvider="UserMembershipProvider">
  <providers>
    <!--<add name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />-->
    <add name="**UserMembershipProvider**" type="MyProject.Models.UserMembershipProvider" applicationName="/" />
  </providers>
</membership>
<roleManager defaultProvider="DefaultRoleProvider">
  <providers>
    <add name="DefaultRoleProvider" type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/" />
  </providers>
</roleManager>
<sessionState mode="InProc" customProvider="DefaultSessionProvider">
  <providers>
    <add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" />
  </providers>
</sessionState>

As you can see I was using a custom membership provider called “UserMembershipProvider” in MVC 2 (though it wasn’t really used after I moved to Facebook authentication), and I copied over the same thing to MVC 4.

What am I missing?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:59:02+00:00Added an answer on June 18, 2026 at 2:59 am

    Any chance that when you upgraded the forms auth section in web.config was removed/updated?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am migration a site from asp.net-mvc and IIS onto apache. Everything is migrated
We have just migrated from solr3.5 to solr3.6, for all this time we have
I just migrated from Windows to Mac OS X and have found theres no
I just right now migrated from C# to C++/CLR. First I was annoyed, that
I've just had my website migrated from Joomla 1.5 to 2.5, however, I am
I have recently migrated my MVC application from Visual Studio 2010 to Visual Studio
I just migrated my .NET MVC 3.5 sp1 app to a VPS running 2008x64
We migrated from MVC 2 Preview 1 to MVC 2 Preview 2 to using
i have just migrated from a single web server environment to a multiwebserver environment
Hi I have a solution which I just migrated from .Net 3.5/MVC1/VS2008 to .Net

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.