Question

Hi I am using asp.net. My requirement is as follows

The user logs in to his/her system using his network credentials. After successfully logging into the system he opens the home page of the application like www.xyz.com/Index.aspx. Since he is not authorized he is redirected to www.xyz.com/logon.aspx

But the crux here is he uses the same user ID & password which he used earlier to log in to the system.Thus he has to login twice. I want that once the user successfully logs into the system he should be able to directly open the www.xyz.com/Index.aspx & not asked to login again

We are using IIS to host our application. The pages are developed on dot net framework 2.0 & developed using Visual Studio 2005

No correct solution

OTHER TIPS

  1. Configure IIS to use Windows authentication on the virtual directory, and turn off all the other authentication types.
  2. Remove your login page, you don't need one.
  3. Put this in your web.config file in the <system.web> section:

    <authentication mode="Windows"/>
    <authorization>
        <deny users="?"/>
    </authorization>
    
  4. Use User.Identity to get the user's WindowsIdentity in a web page.

EDIT: ASP.NET supports three authentication providers out of the box: Forms, Passport and Windows. If you want something else then you'll have to implement it from scratch. A quick Google search turned up this Custom Authentication Provider how-to, which might give you some pointers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top