ASP.NET profile properties are trivially available to the code-behind of an ASPX web page courtesy of the HttpContext.Current.Profile object.
In a .svc web service, how does one bring ProfileCommon and paraphernalia into scope?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In the
web.configfile is a commented out section controlling whether the profile service is enabled. Enabling it changes the generated code and HttpContext becomes available.You don’t have the class that descends from ProfileBase to present profile properties as strongly typed properties. This however is hardly a disaster, you just use
and cast the result.