Pass Asp.net Membership Provider to web server through WCF

Z

Zheng Chen

I have an aspnetdb database sitting in different domain with the web server.
To authenticate a user and populate membership provider, WCF is used.
However, I have no idea how to pass the membership provider back to web
server. Therefore, I can not use the role feature in the web.sitemap. All the
sample code I found uses the membership provider at server site on the same
domain with the aspnetdb. No sample solution passes the membership provider
through the WCF back to the web server (Client Site). Can anyone help on
this? My boss may consider pay for it if it helps.

Thanks in advance!

Zheng
 
S

sloan

Take this with a grain of salt...but I think.........


You may have to write your own Custom Membership Provider ...... which can
simply be a wrapper ( Adapter Design Pattern ) for the
SqlMembershipProvider.


You'll need a "local" version..... which passes calls thru to WCF.

Then you'll need the ServiceLayer.<<I do this just to keep a clean
implementation

Then you'll need the server side code...with is the actual wrapper for the
SqlMembershipProvider.

...........


I think the trick is that you have to write a service contract...
IMyService....which implements MembershipProvider (or one of the higher
interfaces for this class).


Take a look at this example
http://sholliday.spaces.live.com/blog/cns!A68482B9628A842A!158.entry

ZebraControllerServiceWrapper
ZebraControllerFascade
ZebraController

one of the things you'll notice is that all of these implement
IZebraController


to get to your situation.... I ~think~

IZebraController : MembershipProvider

But wait..MembershipProvider is an abstract class...so I don't even think
that will work.

Maybe IZebraController can implement MembershipBase (?? going from memory
here)...or something like that.

Its an interesting problem.

Do a followup and see if that gets you anywhere, or if you hit a roadblock.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top