Security for ASP.NET application running on intranet / VPN

Posted by Ryan on Stack Overflow See other posts from Stack Overflow or by Ryan
Published on 2010-03-18T08:45:58Z Indexed on 2010/03/18 8:51 UTC
Read the original article Hit count: 426

Filed under:
|
|

Hi,

I have an ASP.NET app that sits on our intranet, using the WindowsIdentity to identify the user:

WindowsIdentity wi = HttpContext.Current.User.Identity as WindowsIdentity;

if (wi == null || wi.Name == null)
{
    noAccess("No WindowsIdentity");
    return;
}

string username = wi.Name;
    if (username.Contains("\\"))
        username = username.Substring(username.LastIndexOf("\\") + 1);

This works fine on our Intranet. However, when users from other offices (separate network, with firewall open) they get a password request input box.

Why are they getting the password dialogue?

What is the recommended way identify users of the app? I want to avoid using password, but windows identities. Anyone attempting to access the application is inside a trusted network.

Thanks a lot for any help

Ryan

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about security