473,385 Members | 1,846 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,385 software developers and data experts.

Get user profile in ASHX

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
Feb 9 '07 #1
1 4498
I've figured it out:

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

Thanx anyway,
Roel
"Roel" <no_spam_pleasewrote in message
news:O7**************@TK2MSFTNGP06.phx.gbl...
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


Feb 12 '07 #2

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

Similar topics

0
by: JJ | last post by:
I am trying to use .ashx files to handle dynamic image requests. The aspx page needs to pass the data to the ashx file. It was decided to not use the query string. Instead we hoped we could use the...
5
by: Roshawn Dawson | last post by:
Hi, Has anybody created an entire asp.net app using only ashx files? I know that they are simply handlers used by the asp.net worker process. I hear that they are in some respects better than...
3
by: Tim | last post by:
Guys I am trying to create an ashx IHttpHandler that will provide images for me. This is what I have done so far. ' Start test.ashx <%@ WebHandler Language="VB" Class="testashx" %>
4
by: Nick Gilbert | last post by:
Hi, Is it possible to access the Session of an arbitary user from an aspx page? On an e-commerce site, I am notified of payment success via a callback from the payment server to an ASPX page...
0
by: AndySummers | last post by:
Hi We have just re-written a majour asp.net project to use a user control embedded in a web page. The main dll references 3 other custom controls and so to deploy the project I copy the 4 dll's to...
9
by: =?Utf-8?B?Sm9obiBBdXN0aW4=?= | last post by:
I have an app that prints entry tickets. If the printer driver is not set up exactly to detect the black mark on the back of the ticket, the tickets do not print correctly. Because of this, all...
2
by: Max2006 | last post by:
Hi, After I right-click on my web application project file and choose "Publish ." and do the publishing, the result publishable files does not include the *.ashx files. Is it by design? How...
0
by: nickmarkham | last post by:
Hi, I have 'localized' the button images in my web app by using an HTTP handler file for each image so the correct langauge imagebutton can be loaded depending on the users language. In the...
4
by: Scott M. | last post by:
When profile data is stored in ASP .NET, where is the user data persisted? For how long is it persisted: is it session persisted or permanent (like a cookie)?
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.