J
Jerry N
I am planning on using Windows authentication for a web page. I've added
these lines to my web.config file:
<identity impersonate="true"/>
<authentication mode="Windows" />
And I can view the name with:
void Page_Load(object sender, EventArgs e) {
if(User.Identity.IsAuthenticated ) {
lblIdentity.Text = "The current user is " + User.Identity.Name;
} else {
lblIdentity.Text = "The current user is not authenticated.";
}
}
So my question is, how can I authenticate the "Domain" from the
User.Identity.Name property? I was going to split the "Domain\Username"
value to get the domain name but I don't want a remote Windows client to
spoof the domain name. I also hoping to avoid hardcoding the valid domain
names and use Active Directory to validate them.
Any ideas?
Thanks,
Jerry N
these lines to my web.config file:
<identity impersonate="true"/>
<authentication mode="Windows" />
And I can view the name with:
void Page_Load(object sender, EventArgs e) {
if(User.Identity.IsAuthenticated ) {
lblIdentity.Text = "The current user is " + User.Identity.Name;
} else {
lblIdentity.Text = "The current user is not authenticated.";
}
}
So my question is, how can I authenticate the "Domain" from the
User.Identity.Name property? I was going to split the "Domain\Username"
value to get the domain name but I don't want a remote Windows client to
spoof the domain name. I also hoping to avoid hardcoding the valid domain
names and use Active Directory to validate them.
Any ideas?
Thanks,
Jerry N