Get user profile in ASHX

R

Roel

Hi,

Is there a way to get a user's profile from within a HTTP handler (ashx)?

The code I use to get a profile in a webform (aspx) is:

ProfileCommon pc = Profile.GetProfile("johndoe");
context.Response.Write(pc.HomeAddress);

so I assumed it would be something like

ProfileCommon pc = context.Profile.GetProfile("john_doe");
context.Response.Write(pc.HomeAddress);

Regards,
Roel
 
R

Roel

I've figured it out:

ProfileCommon pc = (ProfileCommon)context.Profile;
pc = pc.GetProfile("johndoe");
context.Response.Write(pc.HomeAddress);

Thanx anyway,
Roel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top