How do you get asp.net anonymous authentication token for profile support? -


Then I have an asp.net web application (web site is not) that I support profiles for anonymous users I am trying to do I have a form and I want anonymous users to enter their name and email only once, and that information will be automatically accessible to them for the next load.

My web I have an anonymous ID setup in the config:

  & lt; Anonymous identification enabled = "correct" cookieless = "autodetect" />  

I have my profile section setup like this:

  & lt; Profile default provider = "SqlProvider" enabled = "true" inherits = "QA_Web_Tools.UserProfile" & gt; & Lt; Providers & gt; & Lt; Clear /> & Lt; Add connection StringName = "QatoolsConnectionString" name = "SqlProvider" type = "System.Web.Profile.SqlProfileProvider" /> & Lt; / Providers & gt; & Lt; / Profile & gt; Finally, because of my app, there is a web app and no web site, I am using profiles through this custom object:  
  Public class UserProfile: ProfileBase {Public Stable UserProfile GetUserProfile (String Username) {Create UserProfile (User Name); } Public Static User Profiles GetUserProfile ({Create GETUser (.Username) as UserProfile;} [SettingsApplications (True)] Public String Full Name {{Return Return ["Full Name"] Get String As Set {base ["BuildEvmail"] = {base {"FullName"] = value;}} [settingsAlloanName (true)] public string buildmail {get {return base ["buildmail"] string as;} {base ["BuildEvmail"] = value ;}}}  

This code of coming

The problem is that this code does not support anonymous users or if I do not know how I use the GetUserProfile () method with any parameter Can not do this because if the user is anonymously, then subscribe. GetUser () is zero I can pass in the anonymous ID token earlier in the GetUserProfile (string username) method, but I get an anonymous ID token for the current user Receive no way I could find. What

No How to obtain this information? It does not seem to return to Google fruitful results.

Thanks,

Success!

I changed:

  Public Static User Profiles GetUserProfile () {Create Return (Subscription .GETUser (.Username) as UserProfile;}  <  

  public static user profile GetUserProfile () {HttpContext.Current.Profile as UserProfile;}  

and now it works Does!


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -