Manipulating roles remotely

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

My web app uses asp.net 2.0 roles/membership. My problem is how to
manipulate those remotely and I am thinking of implementing a web service.
My question is how does a web service residing in a sub folder of the web
app can access the web app's roles/membership info and manipulated it via
code? A code example would be helpful.

Thanks

Regards
 
My web app uses asp.net 2.0 roles/membership. My problem is how to
manipulate those remotely and I am thinking of implementing a web service.
My question is how does a web service residing in a sub folder of the web
app can access the web app's roles/membership info and manipulated it via
code? A code example would be helpful.

You can simply have an ASMX file in a sub-folder like any other webservice.

To create an account, you may have a WebMethod, say:

CreateAccount(string email, string password, string, ...)

And from there, you can call the method Membership.CreateUser within this
method...


Will all this code do?
 
Yes, thanks. My confusion is how does the web service relate/connect to the
membership/role system of the main app? If I start using membership methods
in the web service would it automatically access the same backend aspnet
users/roles db as the main app? I am probably being dumb but as I have not
done it before so am looking for clarification.

Thanks
 
Yes.
The ASPX and ASMX are the part of the same web-application... (share common
web.config)


--
Happy Hacking,
Gaurav Vaish | http://www.mastergaurav.org
http://www.edujini.in | http://webservices.edujini.in
-------------------


John said:
Yes, thanks. My confusion is how does the web service relate/connect to
the membership/role system of the main app? If I start using membership
methods in the web service would it automatically access the same backend
aspnet users/roles db as the main app? I am probably being dumb but as I
have not done it before so am looking for clarification.

Thanks
 
Back
Top