June 16, 2009 at 10:44 pm
In masterpage.master.cs supposed to be getting the windows login with this line
lbUserLoginID.text = "Logged In as: " + WindowsIdentity.GetCurrent().Name.ToString();
But the user is displaying as NT Authority\NETWORK SERVICE instead of the user. Have IIS6 CaC enabled and the app is prompting for the user's CaC id pin. When the wrong pin is entered the access to the web page fails. When the pin is entered correctly the front page of the app comes up but without the proper authority of the logged in user. Any ideas to correct this?
June 17, 2009 at 11:08 am
lbUserLoginID.text = "Logged In as: " + WindowsIdentity.GetCurrent().Name.ToString();
That is for Winforms application but your application is Asp.net so it is running in the context of Asp.net, if you want that to impersonate your users you need Windows Authentication and write the relevant code.
Kind regards,
Gift Peddie
June 17, 2009 at 9:31 pm
Yes - using the WindowsIdentity.GetCurrent syntax and getting the name in the "logged in as:" on my screen.
But am not getting access to the database.
Using roles with Windows Authentication. But I think there is something wrong in my web.config. In researching read something about machine.config as well. Having to manually change the aspnet inside iis6 to point to the correct aspnetsqlmembershipprovider and aspnetsqlroleprovider to even get the main screen up. (I'm new to asp.net and did not know that the asp.net inside iis6 was my web.config file.) So now I've found some more insight into changing the web.config to authenticate properly. Sure would like to get this working.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply