473,396 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Membership.GetUser Issues

Hi,

I have a blog in my application that any registered user can post to
(I am using Microsoft's Memberships and Profiles for this). When I
show the blog entries in a datalist I also want to show the username
of the registered user that added the entry. My blog table holds the
Guid of the user that added the blog entry so I simply want to retrive
the user information through the UserId Guid.

I found the Membership.GetUser() but it doesn't seem like it supports
retriving user information by the UserId Guid. Does anyone have a nice
and clean way of doing this?

Please help.

Thanks

Jun 18 '07 #1
3 5496
Hello.

The Membership.GetUser() method should work for you given that you're using
the default setup for Microsoft's membership and profile services.

http://msdn2.microsoft.com/en-us/library/ms152019.aspx

The documentation linked to from above mentions "associated with the
specified unique identifier." which, in your case, is the GUID. Simply pass
in the GUID.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~
Ben Rush
Microsoft .NET Consultant
http://www.ben-rush.net/blog
http://www.sideshowsystems.com
"Nightcrawler" <th************@gmail.comwrote in message
news:11*********************@w5g2000hsg.googlegrou ps.com...
Hi,

I have a blog in my application that any registered user can post to
(I am using Microsoft's Memberships and Profiles for this). When I
show the blog entries in a datalist I also want to show the username
of the registered user that added the entry. My blog table holds the
Guid of the user that added the blog entry so I simply want to retrive
the user information through the UserId Guid.

I found the Membership.GetUser() but it doesn't seem like it supports
retriving user information by the UserId Guid. Does anyone have a nice
and clean way of doing this?

Please help.

Thanks

Jun 18 '07 #2
On Jun 19, 4:09 am, Nightcrawler <thomas.zale...@gmail.comwrote:
Hi,

I have a blog in my application that any registered user can post to
(I am using Microsoft's Memberships and Profiles for this). When I
show the blog entries in a datalist I also want to show the username
of the registered user that added the entry. My blog table holds the
Guid of the user that added the blog entry so I simply want to retrive
the user information through the UserId Guid.

I found the Membership.GetUser() but it doesn't seem like it supports
retriving user information by the UserId Guid. Does anyone have a nice
and clean way of doing this?

Please help.

Thanks
Do u mean u want HttpContext.Current.User.Identity.Name

for vs 2005 and form authen mode.

ps. comback and say it's rite what u want or not.

Jun 20 '07 #3
On Jun 18, 6:22 pm, "Ben Rush" <ben@sideshowsystemsDOTcomwrote:
Hello.

The Membership.GetUser() method should work for you given that you're using
the default setup for Microsoft's membership and profile services.

http://msdn2.microsoft.com/en-us/library/ms152019.aspx

The documentation linked to from above mentions "associated with the
specified unique identifier." which, in your case, is the GUID. Simply pass
in the GUID.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~
Ben Rush
Microsoft .NET Consultanthttp://www.ben-rush.net/bloghttp://www.sideshowsystems.com

"Nightcrawler" <thomas.zale...@gmail.comwrote in message

news:11*********************@w5g2000hsg.googlegrou ps.com...
Hi,
I have a blog in my application that any registered user can post to
(I am using Microsoft's Memberships and Profiles for this). When I
show the blog entries in a datalist I also want to show the username
of the registered user that added the entry. My blog table holds the
Guid of the user that added the blog entry so I simply want to retrive
the user information through the UserId Guid.
I found the Membership.GetUser() but it doesn't seem like it supports
retriving user information by the UserId Guid. Does anyone have a nice
and clean way of doing this?
Please help.
Thanks- Hide quoted text -

- Show quoted text -
Thanks! It did work exactly as you said.

Jun 22 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Morgan | last post by:
Sorry for cross post, forgot to include aspnet in orinal... Thanks in advance for any assistance. I'm in the process of implementing custom RoleProvider & Membership Provider objects and have...
2
by: Ray Booysen | last post by:
Hi all I'm wanting to know if its possible to retrieve the current user when using the 2.0 membership provider. The GUID UserID in Users I am using as a foreign key in other tables and I need...
2
by: Jav | last post by:
I need to get at the ProviderUserKey of the logged in user. I would have thought that I could do something like: Dim u As MembershipUser = Membership.GetUser Dim ProvKey as Guid =...
1
by: Ben | last post by:
Hi, When an anonymous user has created an new account (with the CreateUserWizard control), i want to let asp.net generate a password and to send it to the address of the email provided by the...
4
by: Ben | last post by:
Hi, i have already posted a more or less similar thread but it's gone unsolved with the flow of the other threads .. When an anonymous user has created an new account (with the...
2
by: Nightcrawler | last post by:
I recently started to use MemberShip, Roles, and User to build a portal site in asp.net 2.0. I currently have set the web.config to only store registered users in the database. I don't want to...
4
by: John | last post by:
Hi 1. Is it possible to disable a user without deleting? 2. Is it possible to add user fields to the membership db such as app's on id for a user? Thanks Regards
8
by: Nick | last post by:
Hi there, Membership.GetNumberOfUsersOnline() works great the first time, then jumps up to the number of users registered in the system. I have tried enumerating through each user individually...
2
by: Florian Paulus | last post by:
Hello group, i'm trying to load some additionally stored information to a user at login time. That data is self created and stored in an sql database. I hooked in the login control...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.