连接extra-net网站时出现404错误 [英] 404 error while connecting the extra-net site

查看:77
本文介绍了连接extra-net网站时出现404错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过编程方式使用域名连接外联网网站,但获取404未经授权的错误

I am trying to connect the extranet site using domain name through programmatically but getting 404 unauthorized error

ClientContext clientContext = new ClientContext(path);

            clientContext.Credentials = new NetworkCredential(userName,Password,domain);

ClientContext clientContext = new ClientContext(path);
            clientContext.Credentials = new NetworkCredential(userName, Password, domain);

这是我使用的代码

推荐答案

您好,

您的目标服务器版本是什么? (SharePoint 2013/2016 /在线)

服务器是否使用Windows身份验证(或FBA / ADFS)?

如果目标服务器使用ADFS身份验证,则可以使用pnp库进行身份验证。

https://github.com/SharePoint/PnP-Sites-Core/blob/master/ Core / SAML%20authentication.md

您可以尝试CredentialCache,它遇到类似的错误低于线程。

https:// sharepoint。 stackex change.com/questions/188527/2010-problem-in-authenticating-csom-c-code

最好的问候,

Lee


这篇关于连接extra-net网站时出现404错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆