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 8868837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:21:12+00:00 2026-06-14T17:21:12+00:00

I am using Web Forms Template in VS2012 and looking at OpenAuth code. I

  • 0

I am using Web Forms Template in VS2012 and looking at OpenAuth code.

I wish to store some external data after a successful external login, but during debug cannot see how to get hold of the logged in username during the code execution at these points after a valid external login –

ProcessProviderResult
– if (OpenAuth.Login(authResult.Provider, authResult.ProviderUserId, createPersistentCookie: false))

CreateAndLoginUser()
– if (OpenAuth.Login(ProviderName, ProviderUserId, createPersistentCookie: false))

After these calls there is no User.Identity.Name and the username has not been authenticated, so how can I get the membershipusername?
It seems to be logged in after the redirect (do I really have to store something in a session and munge it in after redirect? I think I am doing it wrong).

What methods on OpenAuth.?? or equivalent do I need to call to get the username so I can then store my data as required.

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-14T17:21:13+00:00Added an answer on June 14, 2026 at 5:21 pm

    User.Identity.Name will only be filled by the Forms Auth authentication provider on return (after the client has been redirected, as you point out).

    But during the auth process, in the OpenAuth code before the redirect, the user name is simply represented by AuthenticationResult.UserName (ie: authResult.UserName in ExternalLoginLandingPage.aspx.cs).

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

Sidebar

Related Questions

I have a ASP.NET Web Forms application and I'm using some dynamic controls in
I'm currently working on a Lotus Notes solution. We're just using Web forms so
I am using ASP.NET Web Forms/C# . I am having this function in my
When developing ASP.NET websites (using VB.NET web forms) - a lot of my time
I have an ASP.NET 4 Web Forms app that is using URL Routing. I
I am working on an ASP.NET web forms application that is using Forms Authentication.
I have a web app using forms authentication and I have restricted a folder
Has anyone tried to back up a SharePoint web application using forms based authentication
I am building a Web Application using asp.net (C#). I come from windows forms
Ok so I am using forms authentication in my web site and I defined

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.