asp.net-profiles

SQL aspnet_profile

*爱你&永不变心* 提交于 2019-12-07 05:45:16
问题 any idea how I can get user FirstName and LastName from the aspnet_profile table based on UserID using SQL becasue I would like to use in Telerik Reporting as a user parameter. Sample row (FirstName is George, LastName is Test): UserID: 06b24b5c-9aa1-426e-b7e4-0771c5f85e85 PropertyName: MobilePhone:S:0:0:Initials:S:0:1:City:S:1:14:FirstName:S:15:6:PostalCode:S:21:7:‌​WorkPhone:S:28:12:LastName:S:40:5:Address1:S:45:17:Address2:S:62:0:Province:S:62:‌​2:Organization:S:64:4:ClinicId:S:68:1

SQL aspnet_profile

会有一股神秘感。 提交于 2019-12-05 11:13:07
any idea how I can get user FirstName and LastName from the aspnet_profile table based on UserID using SQL becasue I would like to use in Telerik Reporting as a user parameter. Sample row (FirstName is George, LastName is Test): UserID: 06b24b5c-9aa1-426e-b7e4-0771c5f85e85 PropertyName: MobilePhone:S:0:0:Initials:S:0:1:City:S:1:14:FirstName:S:15:6:PostalCode:S:21:7:‌​WorkPhone:S:28:12:LastName:S:40:5:Address1:S:45:17:Address2:S:62:0:Province:S:62:‌​2:Organization:S:64:4:ClinicId:S:68:1:Country:S:69:6:Fax:S:75:0:MSPNumber:S:75:0:‌​ PropertyValuesString: HEast HustonEASGeorgeT7D 1N8604-111

How to set profile data for new user

时间秒杀一切 提交于 2019-12-05 04:21:41
问题 I have an MVC3 site and I am writing code to register a user. The code does this: MembershipCreateStatus createStatus; Membership.CreateUser(model.UserName, model.Password, model.Email, null, null, true, null, out createStatus); The next thing it does is this: HttpContext.Profile["FirstNAme"] = model.FirstName; HttpContext.Profile["LastName"] = model.LastName; This is where it fails. The error I get is: This property cannot be set for anonymous users. I understand why; it is because there is

ASP.NET Profile save overwritten by old values

谁说胖子不能爱 提交于 2019-12-04 04:59:47
I am using the Profile feature of ASP.NET in a website. Updating a profile is working weirdly! A user can't update his/her own profile, neither the web site user nor the administrator, but, the administrator is able to update profiles of other users. In the backend, after Profile's save() is called, SQL Server traces show that aspnet_Profile_SetProperties stored procedure is called twice. First, with new values, then, with old values. The second execution is done after page unload. My code has nothing to do with transactions. Why is it working so weirdly? Could there be an issue with aspnet

How to set profile data for new user

故事扮演 提交于 2019-12-03 21:57:38
I have an MVC3 site and I am writing code to register a user. The code does this: MembershipCreateStatus createStatus; Membership.CreateUser(model.UserName, model.Password, model.Email, null, null, true, null, out createStatus); The next thing it does is this: HttpContext.Profile["FirstNAme"] = model.FirstName; HttpContext.Profile["LastName"] = model.LastName; This is where it fails. The error I get is: This property cannot be set for anonymous users. I understand why; it is because there is no user logged in or no user specified, so of course I can't set the profile for the user. I am working

ASP.NET Roles and Profiles: best way to query for collection of users who match custom profile property?

戏子无情 提交于 2019-12-02 12:13:11
问题 ASP.NET 2.0 membership, roles, and profiles is the cat's meow. The API for roles supports handy methods like GetAllUsersInRole("MyNewsletterSubscriber"), which will return a collection of people in the "MyNewsletterSubscriber" role. I am wondering what the best way to return a collection of people with custom ASP.NET Profile properties might be. So for example, I might create one custom profile property called IsNewsletter1SubscriptionUserSelectionTextOnly and another custom profile property

accessing profile.newproperty in MVC web applications

断了今生、忘了曾经 提交于 2019-12-01 10:45:06
I recently asked this question How to persist anon user selection (ex: theme selection) . and started to learn about ASP.NET profiles and their properties in the web config. I tried the answer from the link but i was unable to access profile.newproperty How to assign Profile values? This question specifies that web-applications don't support profile out of the box and a custom model based on ProfileBase must be created. The question was answered in 2009 and I wanted to know if this is still the same case. In a ASP.NET 4.0 web application can I access profile.newproperty with a property i

Is it possible to access a profile without updating LastActivityDate?

好久不见. 提交于 2019-11-30 18:41:39
In asp.net (using MVC, but this happens in regular too) Profile.GetProfile(username); will update the LastActivityDate for that user. This is not intended when someone else is viewing that user's profile. In the membership class you can specify whether to update this date with a second param, like so: Membership.GetUser(username, false); // doesn't update LastActivityDate Membership.GetUser(username, true); // updates LastActivityDate Is there anyway to do something similar in the Profile provider without writing my own provider? You might use one ugly workaround which includes changing aspnet

Is it possible to access a profile without updating LastActivityDate?

為{幸葍}努か 提交于 2019-11-30 02:37:56
问题 In asp.net (using MVC, but this happens in regular too) Profile.GetProfile(username); will update the LastActivityDate for that user. This is not intended when someone else is viewing that user's profile. In the membership class you can specify whether to update this date with a second param, like so: Membership.GetUser(username, false); // doesn't update LastActivityDate Membership.GetUser(username, true); // updates LastActivityDate Is there anyway to do something similar in the Profile

MVC-Mini-Profiler - Web Forms - Can't find /mini-profiler-results

混江龙づ霸主 提交于 2019-11-28 20:32:38
问题 I'm trying to get MVC-mini-profiler to work with webforms. NUGET I've installed the Nuget package. PM> Install-Package MiniProfiler Head I have this in the head section of my website. <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> <%= MvcMiniProfiler.MiniProfiler.RenderIncludes() %> DAL I'm using it inside one function as a POC. This is not in the Global.asax (I dont know if that's required or not.) profiler = MiniProfiler.Start