By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,363 Members | 2,961 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,363 IT Pros & Developers. It's quick & easy.

Pass Asp.net Membership Provider to web server through WCF

P: n/a
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
Dec 3 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a

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.



"Zheng Chen" <Zh*******@discussions.microsoft.comwrote in message
news:2D**********************************@microsof t.com...
>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

Dec 3 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.