Manipulating roles remotely

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
 
G

Gaurav Vaish \(www.EduJini.IN\)

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?
 
J

John

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
 
G

Gaurav Vaish \(www.EduJini.IN\)

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
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top