ASP Website and Windows Authentication
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I would like to create a website to access some Vault functions. I want the site to be able to use the credentials of the user in the browser to log into Vault with Windows authentication.
So far I am able to set the AppPool Identity to a windows user that has Vault access and the Vault login will use those credentials easily enough.
When I try to set the website for Windows authentication and <identity impersonate="true" /> in the web.config the Vault login complains. "The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Negotiate,NTLM'."
The code on the backend:
ServerIdentities serverIdentities = new ServerIdentities()
{
DataServer = "APP01",
FileServer = "APP01"
};
WinAuthCredentials credentials = new WinAuthCredentials(serverIdentities, "Vault", false);
WebServiceManager webServiceManager = new WebServiceManager(credentials);
I'm having trouble finding information on this matter so any help is appreciated. Thanks.