【发布时间】:2017-03-07 03:51:18
【问题描述】:
我正在尝试运行我的一个 Web 应用 API,但是当提示输入用户和密码时,它让我拒绝访问。我什至尝试从 NTLM 更改为 Kerberos。仍然无法正常工作。我是sharepoint的新手。一个月前才开始
这就是我调用我的 api 的方式
var json = $.ajax({
url: (serviceType == "wcf" ? wcfServicesUrl : servicesApi) + wcfServiceUri,
type: type,
data: data,
crossDomain: true,
contentType: "application/json",
dataType: "json",
xhrFields: {
withCredentials: true
},
)};
【问题讨论】:
-
你能分享一下你在哪里调用API的代码吗?如果您从 JS 调用它,您可能需要添加一个 auth 标头
-
我编辑了帖子
标签: asp.net-web-api windows-authentication