+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / How auto create users, using windows authentication

How auto create users, using windows authentication

5 posts, 0 answered
  1. Fujiy
    Fujiy avatar
    8 posts
    Registered:
    18 Mar 2010
    11 Nov 2010
    Link to this post

    I am using Authentication=Windows.

    But when a user try to access sitefinity, that user dont exists at database. Then I need to login at Admin and create user for each windows login.

    How can I automatically do this? When a user first time access with a new login, auto create it at sitefinity?

    Thanks

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    11 Nov 2010
    Link to this post
    Hi Felipe .,

    The Membeship class has two methods that you can use

    Public method Static member CreateUser(String, String) Adds a new user to the data store.
    Public method Static member CreateUser(String, String, String) Adds a new user with a specified e-mail address to the data store.

    We use the standard ASP.NET Login control inside Sitefinity/Login.aspx page. You can validate your user inside Authenticate event and login the user in LoggedIn event.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Fujiy
    Fujiy avatar
    8 posts
    Registered:
    18 Mar 2010
    11 Nov 2010
    Link to this post

    Hi,

    The problem is that Idont need to validate/login, it is integrated with windows login.

    The user is never redirected to Login.aspx. It just see a error: This page is not served, because that user dont exists and dont have roles/permissions.

    I think to create a ASP.NET Module to do this, but it seems a elephant to kill a ant

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    11 Nov 2010
    Link to this post
    Hi Felipe .,

    By default Sitefinity relies on FormsAuthentication cookie and RolePrincipal, when you use IWA there is no FormsAuthentication cookie and FormsIdentity. Basically our CmsHttpModule does not support windows authentication. You can force Windows authentication for some physical files, but then you should authenticate yourself through Sitefinity login form( backend or using ASP.NET Login control on the front end).

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Fujiy
    Fujiy avatar
    8 posts
    Registered:
    18 Mar 2010
    11 Nov 2010
    Link to this post

    I did this: http://www.sitefinity.com/help/developer-manual/windows-authentication.html

    Login worked(IIS ask for login before access the page)! But I need a way to create that login at database to put the roles.

    I think I really need to module to monitor all requests

Register for webinar
5 posts, 0 answered