简体   繁体   English

自动填充集成的Windows身份验证

[英]Autofill an Integrated Windows Authentication

I'm making an application with C#, this application will automatically navigate to a SharePoint site and gather some information. 我正在使用C#开发一个应用程序,该应用程序将自动导航到SharePoint网站并收集一些信息。 I have basic User Rights to the site (Meaning I'm not at a Site Admin), the SP site uses Integrated Windows Authentication which looks like this, 我具有该站点的基本用户权限(意味着我不是站点管理员),SP站点使用的集成Windows身份验证如下所示, 在此处输入图片说明

How can I get the C# application to autofill the needed credentials when the WebBrowser control navigates to the site? WebBrowser控件导航到站点时,如何获取C#应用程序以自动填充所需的凭据?

This is a very basic break-down, - Application Opens - 'Navigate' Button is clicked - WebBrowser1 Control Navigates to the SP Site and autofills the supplied credentials (Within the code). 这是一个非常基本的细分,-打开应用程序-单击“导航”按钮-WebBrowser1控件导航到SP站点并自动填充提供的凭据(在代码内)。

在此处输入图片说明

This is the code I'm using to complete this operation, 这是我用来完成此操作的代码,

WebClient client = new WebClient();
        CredentialCache cc = new CredentialCache();
        cc.Add(new Uri("http://spSite"), "NTLM", new NetworkCredential(username, password, domain));
        client.Credentials = cc;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM