ASP.NET Membership Provider Web Service
A couple of years ago I was in need of a full featured membership provider provided over web services. I found Shaun Wilde’s project. Shaun’s project provided a membership and role provider over web services, but lacked a profile provider. I added the profile provider.
I ended up changing directions with the project I was working on and this code never got used in production. Testing on it was minimal and I haven’t touched it two years. However, I have received a large number of requests for the code…so here it is:
ASP.NET 2.0 Web Service Membership, Role, and Profile Provider
Feel free to post enhancements or suggestions here.
Hi,
I am developing a web service based custom profile provider.
I’ve following projects :
1. Consumer (It consumes my web service).
2. Service (It has my custom profile provider & my web service).
I was trying to make a WebMethod as below:
public SettingsPropertyValueCollection GetPropertyValues(parameters….)
But I was getting an error as following:
The type System.Configuration.SettingsContext is not supported because it implements IDictionary.
Then I found your post & saw your code & you had tackled the above situation by using string[] returntype.
But I still was not able to solve my problem, because of following reasons:
1. In my Consumer I’ve used a proxy Profile Provider which acts as my provider for the application & but actually it calls from my Service the WebMethod GetPropertyValues(parameters….)[now with return type string[] after seeing your example], but at my Consumer the proxy provider has abstract method as :
public override System.Configuration.SettingsPropertyValueCollection GetPropertyValues
so, now I am unable to map it to the return the values from the WebMethod having string[] returntype.
2.Also, I am worried about, how am I going to make available, my custom profile properties without actual re-declaring them on the consumer.
Please throw some light on it, also it’ll really helpful to me, if I can see your code of how you have handle it at both ends(Client & Service).
Regards,
M.Pen.
Comment on July 22, 2010 @ 12:35 pm
It’s been a while since I looked at this, but I don’t see anyway around re-declaring the properties on the client side since the types are strongly typed. There might be a way around it if you’re using .NET 3.5 / 4.0, but I couldn’t promise you.
Comment on July 22, 2010 @ 4:34 pm