开发者

Oracle on Linux with ASP.NET Windows Authentication Impersonation

开发者 https://www.devze.com 2022-12-30 18:50 出处:网络
Can someone please direct me on how to do this type of setup开发者_如何转开发, i.e. I have a Windows Server with ASP.NET pages and would like to pass those credentials using Integrated Windows Authent

Can someone please direct me on how to do this type of setup开发者_如何转开发, i.e. I have a Windows Server with ASP.NET pages and would like to pass those credentials using Integrated Windows Authentication to a Linux-based Oracle DB.


You could try putting

  <system.web>
    <identity impersonate="false" />

In the web.config. This should send the credentials of the end user through to the database. If this isn't what you want, then try something like

ImpersonableWebRequest request = WebRequest.Create(url);

CredentialCache creds = new CredentialCache();
NetworkCredential networkCredential = new NetworkCredential("bob", "130B", "domain");
creds.Add(new Uri(url), authType, networkCredential);   

request.Credentials = creds;
0

精彩评论

暂无评论...
验证码 换一张
取 消