I am new to Umbraco and find it very interesting, I have the problem below. Can anybody please help?
I have Umbraco configured in one of my projects which is in MVC, which is working fine, in this project I have members created.
I have another .NET Web Forms project, with login page, and other pages.
Now the question is, can I use the CMS Members from my 1st project, ie. Umbraco to authenticate the users login of second, ie. Web Formsproject. If yes, then how?
We have done something similar just now. In our case we are migrating from one one CMS to another and as a first step we had to move the login handling to Umbraco.
After trying out multiple solutions the final one was to set up the Umbraco website on a sub domain as a completely separate site. Main website is on www.something.com and the Umbraco one is on umbraco.something.com.
Then we have created a new controller inheriting from
UmbracoApiControllerand created methods to login, logout and to check if the user is logged in. All these methods are using theMembersMembershipProviderAfter all this you can call these methods with RestSharp for example, from your other project.
To make this work it is important to use forms authentication, have the website on a sub domain AND to set the forms authentication domain correctly (see below).
This last part is important (
domain=".something.com"), otherwise the Umbraco website cannot access the cookie from the subdomain. You can find out more about this here. The first dot is important, more information here (page 7).I am not sure if this can be used in your case, but hope it helps to give you an option.