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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:10:09+00:00 2026-05-14T22:10:09+00:00

I am trying to get the aspnet membership UserId field from an anonymous user.

  • 0

I am trying to get the aspnet membership UserId field from an anonymous user.

I have enabled anonymous identification in web.config :

<anonymousIdentification enabled="true" />

I have also created a profile:

<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="/" />
  </providers>

  <properties>
    <add name="Email" type="System.String" allowAnonymous="true"/>
    <add name="SomethingElse" type="System.Int32" allowAnonymous="true"/>
  </properties>

</profile>

I see data in my aspnetdb\aspnet_Users table for anonymous users that have had profile information set.

Userid                                  PropertyNames   PropertyValuesString     
36139818-4245-45dd-99cb-2a721d43f9c5    Email:S:0:17:   me@example.com

I just need to find how to get the ‘Userid’ value.

It is not possible to use :

 Membership.Provider.GetUser(Request.AnonymousID, false); 

The Request.AnonymousID is a different GUID and not equal to 36139818-4245-45dd-99cb-2a721d43f9c5.

Is there any way to get this Userid. I want to associate it with incomplete activity for an anonymous user. Using the primary key of aspnet_Users is preferable to having to create my own GUID (which I could do and store in the profile).

This is basically a dupe of this question but the question was never actually answered.

  • 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-05-14T22:10:10+00:00Added an answer on May 14, 2026 at 10:10 pm

    You can get the UserId for an anonymous user with this:

    string userId = Request.AnonymousID

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

Sidebar

Related Questions

I am trying to get the currently logged in user's UserId as mentioned in
In ASP.Net, I am trying to get the UserId (i.e., the user GUID) of
I'm trying to get the new ASP.NET Web API beta (VS 2010 default Web
Using ASP.NET MVC when trying to get the information stored on my Session[objectName] from
We've got an Asp.Net web application we're trying to get pseudo-deployed to a folder,
I'm trying to figure out the membership module in asp.net. Currently i have a
Is there an API in the ASP.NET membership, implementation to get all user profiles
I am trying to set up the membership provider. I have used the ASP.Net
I have an MVC4 application with an aspnet.mdf database with membership tables and I’ve
I am using asp.net membership and trying to update a users details but get

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.