R
Raj Thakkar
Hi,
I am currenty working on a site for intranet.
I have a user control in the header of every page that will be
displayed only if people with certain username are surfing the site.
These lists of usernames is stored on the server side in a xml based
file
So what I am doing at the moment is inside the user control pageload
method, i get the username of the current person logged in using
HttpContext.Current.User.Identity.Name and if the username is within
the list of 'allowed-access-usernames', I continue loading the
usercontrol else I set its visibility to false
so they can't see it.
It all works fine if I try to access the site from localhost.
The application grabs my windows username and verfies it against the
list, if i am present in the list, I see the control else I don't
The problem comes when I try to access the site from different machine.
As soon as i try to access the page, IE pops up a window asking for
username and password which I don;t want to.
I want to just grab the username of currenty logged in user on the
machine and give it to the server.
Can anyone help me how do i achieve this?
BTW, I am doing this using windows authentication.
In the IIS 5.1, I have
Anonymous Access unchecked
Integrated Windows Authentication checked
In web.config file
I have windows authentication
and
<identity impersonate="true" />
Thanks,
Raj
I am currenty working on a site for intranet.
I have a user control in the header of every page that will be
displayed only if people with certain username are surfing the site.
These lists of usernames is stored on the server side in a xml based
file
So what I am doing at the moment is inside the user control pageload
method, i get the username of the current person logged in using
HttpContext.Current.User.Identity.Name and if the username is within
the list of 'allowed-access-usernames', I continue loading the
usercontrol else I set its visibility to false
so they can't see it.
It all works fine if I try to access the site from localhost.
The application grabs my windows username and verfies it against the
list, if i am present in the list, I see the control else I don't
The problem comes when I try to access the site from different machine.
As soon as i try to access the page, IE pops up a window asking for
username and password which I don;t want to.
I want to just grab the username of currenty logged in user on the
machine and give it to the server.
Can anyone help me how do i achieve this?
BTW, I am doing this using windows authentication.
In the IIS 5.1, I have
Anonymous Access unchecked
Integrated Windows Authentication checked
In web.config file
I have windows authentication
and
<identity impersonate="true" />
Thanks,
Raj