Question : bypass login screen on intranet app LDAP authentication VB.Net

I am developing a new intranet site that allows users in certain groups through AD more access to different features of the site.  The problem is, we have many off site domain servers, and it seems 2 or 3 of them are asking the user to login (which should never happen).  This is a pain as I have no control over those network components, and I would like to remove the login popup from showing.  If the application doesn't know who it is, just assume they don't have access to the restricted features and let them in without asking for a login.

How do I prevent the login screen from showing?

The code included is just showing what LDAP is doing.  I believe the popup authentication is coming from the settings in the web.config by just having a reference to the DirectoryServices though.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
Imports System.DirectoryServices
Imports System.DirectoryServices.AccountManagement    
 
Private ctx As PrincipalContext = New PrincipalContext(ContextType.Domain)
    Private usr As UserPrincipal
    Private HRgrp As GroupPrincipal = GroupPrincipal.FindByIdentity(ctx, "*Human Resources")
 
Dim username As String = System.Security.Principal.WindowsIdentity.GetCurrent().Name    'gets the IIS name
Dim username As String = My.User.Name
Open in New Window Select All

Answer : bypass login screen on intranet app LDAP authentication VB.Net

Yes i thing you should allow anonymous access in ASP.NET. Then in the loading of your masterpage, perform the security check and take the decision accordingly.
Random Solutions  
 
programming4us programming4us