Avatar of Tonysieu
Tonysieu
 asked on

Windows Authentication on an intranet website

Hi

I am deploying a website on IIS 7 that requires windows authentication (this is to be used on an intranet only). We would like the authentication to occur using the logged in user's Windows login without the user's input, i.e. when the user navigates to the site, we want to be able to authenticate against Active Directory to check if the logged in user is in a particluar group, but we don't want the pop-up asking for the username and password to appear.

I have most of it working, I just can't find a way to supress the windows authentication pop-up.

Is this even possible?

In IIS 7 I have set Windows Authentication to enabled, is there anything else I need to do?

In my Web.config I have:

<authentication mode="Windows" />

In my class I have:

 
If User.IsInRole("DOMAIN\GroupName") Then
            Response.Write(User.Identity.Name.ToString & " Is in role")
        Else
            Response.Write(User.Identity.Name.ToString & " Is NOT in role")
 End If

Open in new window


Any help is greatly appreciated!
Visual Basic.NET.NET ProgrammingProgramming

Avatar of undefined
Last Comment
Tonysieu

8/22/2022 - Mon
Cimperiali

have you configured authentication on iis7 server? (open Internet information service from administrative tools on servere - or via mmc, point to web site and then in the right panle search for IIS->authentication)
Tonysieu

ASKER
Hi Cimperiali

Thanks for your comment. I have enabled the windows authentication in IIS 7. How can I stop the windows login pop-up when a user makes a request to the website?

What I want to achieve is that a user should be able to jump straight to the website without having to input their windows login details.  

The asp.net server side code "User.IsInRole("DOMAIN\GroupName")" should check the requesting user's windows login. If they belong to a defined AD group they will be granted access to the website, otherwise the user will be redirected to a "Access Denied" page.
Cimperiali

are you using ie ? Look for athomatic logon  property in Advanced Internet options
for firefox, instead, try follow this tip:
http://en.w3support.net/index.php?db=so&id=1226619
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
ASKER CERTIFIED SOLUTION
Cimperiali

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Cimperiali

Cimperiali

and two words from ms of 4 years ago but still useful:
http://support.microsoft.com/kb/258063/en-us
Tonysieu

ASKER
Thanks so much! it works now.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.