DTaylorAtWork
Technical User
I have an existing ASP.NET 2 webpage using Windows Authentication. I'd like to set up a custom Profile Provider so I can stop storing all the user information in sessions.
I have created the class FormsProfileProvider (it's for an online form site) and it inherits from ProfileProvider. I've only bothered to overload the Get and Set PropertyValues methods for now; the rest just thrown "Not Implemented" exceptions.
I've set up my web.config to use the provider like this:
But when I debug the code my GetPropertyValues method never fires and the HttpContext.Current.Profile object is of type ProfileCommon but all of my custom properties give the exception "The method or operation is not yet implemented".
I've tried setting up a Membership Provider but it wouldn't fire the Validate User method until I tried forms authentication and even then my profile didn't work.
The other problem I have is when I try to just use Profile.Admin it gives me "The name 'Profile' does not exist in the current context"
Can someone help me out?
I have created the class FormsProfileProvider (it's for an online form site) and it inherits from ProfileProvider. I've only bothered to overload the Get and Set PropertyValues methods for now; the rest just thrown "Not Implemented" exceptions.
I've set up my web.config to use the provider like this:
Code:
<profile defaultProvider="FormsProfileProvider" enabled="true">
<providers>
<clear/>
<add name="FormsProfileProvider" type="FormsProfileProvider"
ApplicationName="OnlineForms" ConnectionStringName="ConnString"/>
</providers>
<properties>
<add name="FullName" provider="FormsProfileProvider" type="string"/>
<add name="Admin" provider="FormsProfileProvider" type="bool"/>
<add name="Reporting" provider="FormsProfileProvider" type="bool"/>
<add name="LastActivityDate" provider="FormsProfileProvider" type="DateTime"/>
<add name="LastUpdatedDate" provider="FormsProfileProvider" type="DateTime"/>
</properties>
</profile>
But when I debug the code my GetPropertyValues method never fires and the HttpContext.Current.Profile object is of type ProfileCommon but all of my custom properties give the exception "The method or operation is not yet implemented".
I've tried setting up a Membership Provider but it wouldn't fire the Validate User method until I tried forms authentication and even then my profile didn't work.
The other problem I have is when I try to just use Profile.Admin it gives me "The name 'Profile' does not exist in the current context"
Can someone help me out?