Click here to Skip to main content
12,507,089 members (63,377 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# VB Javascript
Hello

I have a web application (asp.net c#) with authentication page (login page), I want if the user (client computer) is connected to domain get the userName (login name) and bypass the login page (store in session), and if he is not in the domain show him the login page.

I dont want to use activex.

What to do??

Thanks in advance
Posted 27-Nov-12 2:07am
samerfs587
Comments
aspnet_regiis -i 27-Nov-12 8:45am
   
Question is not clear...

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Typically you choose one or the other. Either you enable forms-based authentication and you always prompt for a password or you have Windows-based authentication and you have the site use single-sign-on. Mixing the two (which is basically what you are doing) is tricky but it is possible. Here is a link that will get you started:

http://mvolo.com/iis-70-twolevel-authentication-with-forms-authentication-and-windows-authentication[^]

Like I said, tricky. You will need to set that up in your environment to get started. On the single-sign-on side, you should be all set. Then on the forms-based authentication side, you can follow the directions on this site to set up authenticating against Active Directory:

http://stackoverflow.com/questions/6147864/asp-net-mvc-authenticate-users-against-active-directory-but-require-username[^]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160927.1 | Last Updated 27 Nov 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100