The requirements of our customer state that we need an application that runs separatedly from Umbraco (in MVC), but that can be reached from inside Umbraco without the need to logging in again.
What I did is that I created an application in IIS in a subdirectory of Umbraco, and added a new section in Umbraco that sends the user to that directory.
Now I need to find a way to check if the user is logged in or not, and if he has access to the new section. I tried to add references to the necessary DLLs and to change the membership/role providers in the MVC web.config:
<!-- Membership Provider --> <membershipdefaultProvider="UmbracoMembershipProvider"userIsOnlineTimeWindow="15"> <providers> <clear /> <addname="UmbracoMembershipProvider"type="umbraco.providers.members.UmbracoMembershipProvider"enablePasswordRetrieval="false"enablePasswordReset="false"requiresQuestionAndAnswer="false"defaultMemberTypeAlias="Another Type"passwordFormat="Hashed" /> <addname="UsersMembershipProvider"type="umbraco.providers.UsersMembershipProvider"enablePasswordRetrieval="false"enablePasswordReset="false"requiresQuestionAndAnswer="false"passwordFormat="Hashed" /> </providers> </membership> <!-- added by NH to support membership providers in access layer --> <roleManagerenabled="true"defaultProvider="UmbracoRoleProvider"> <providers> <clear /> <addname="UmbracoRoleProvider"type="umbraco.providers.members.UmbracoRoleProvider" /> </providers> </roleManager>
I also added the database to the appSettings section:
<addkey="umbracoDbDSN"value="..." />
However, the application is not able to authenticate any user. The [Authenticate] attribute is not able to authenticate anyone with the existing cookie, and the Membership.ValidateUser(user, pw) always returns false even if the password is correct.
Am I on the correct way? Or should I do something totally different?
Using the membership provider in a subapplication
Hello,
The requirements of our customer state that we need an application that runs separatedly from Umbraco (in MVC), but that can be reached from inside Umbraco without the need to logging in again.
What I did is that I created an application in IIS in a subdirectory of Umbraco, and added a new section in Umbraco that sends the user to that directory.
Now I need to find a way to check if the user is logged in or not, and if he has access to the new section. I tried to add references to the necessary DLLs and to change the membership/role providers in the MVC web.config:
I also added the database to the appSettings section:
However, the application is not able to authenticate any user. The [Authenticate] attribute is not able to authenticate anyone with the existing cookie, and the Membership.ValidateUser(user, pw) always returns false even if the password is correct.
Am I on the correct way? Or should I do something totally different?
is working on a reply...