Automatically logging into Ubraco using Windows Authentication
I am working away at a Umbraco project, with the goal to be that the user is automatically logged into Umbraco based on their domain username. These are the steps I have so far:
I am hosting a test Umbraco site on IIS 7
The site settings have windows Authentication, meaning that you have to be logged into the domain to access the site
I have created a macro that identifies the current user from Active Directory as soon as someone accesses the page. If the user does not have a matching Umbraco Member Account, then one is automatically created, based on their domain user.
As it stands now, if someone on the domain accesses the Umbraco site, then they will have a Member with a matching username automatically created in Umbraco if it doesn't exist. This is done passively.
The last stage however is that I require that user to become the registered logged in Member in Umbraco. I know who the Umbraco Member is, I just need to have that member automatically logged into Umbraco.
Does anyone know how I can do this?
I'm coding in C#, but any form of documentation would be appreciated.
Automatically logging into Ubraco using Windows Authentication
I am working away at a Umbraco project, with the goal to be that the user is automatically logged into Umbraco based on their domain username. These are the steps I have so far:
As it stands now, if someone on the domain accesses the Umbraco site, then they will have a Member with a matching username automatically created in Umbraco if it doesn't exist. This is done passively.
The last stage however is that I require that user to become the registered logged in Member in Umbraco. I know who the Umbraco Member is, I just need to have that member automatically logged into Umbraco.
Does anyone know how I can do this?
I'm coding in C#, but any form of documentation would be appreciated.
Many thanks and best regards
This is the code to automatically login:
you need these usings:
using umbraco.BasePages;
using umbraco.BusinessLogic;
You just need to put it somewhere..
Does that help?
This is something I need to do currently w/v7
Can someone point me to an example? I dont want to use the Active Directory provider.
This will then allow me to go into the the Umbraco management area and configure specific users for special group access.
is working on a reply...