Wednesday, March 28, 2012

Accessing profile info from Webservice

This is the situation I'm facing: I have a AutoCompleteExtender which fetches data based upon the information stored in Profile fields. When I write the code for the webservice connected to the Extender, I cannot access the data in asp.net's User Profiles. I have a suspicion this is because a web service is not really part of the website, but rather a standalone application.

Is there a way to use the Profile information in a web service?Nobody out there with an answer?
If the web services are part of the app, then there shouldn't be any domain access issues. Can you copy up your code?
I found out how to do it: apparently one needs to access the httpcontext in order to retrieve the Profile information:

Context.Profile["group.name"].ToString()

thank you for posting this!

i've been looking everywhere for such information, and even wrote a post on this board half hour ago after google groups search, but than came across your post and i will be able to sleep tonight.

thanks again!

No comments:

Post a Comment