Создана пользовательская веб-служба, развернутая как решение для фермы для SP2013. Добавлен управляемый путь к папке ISAPI для этой службы в VS Project.Sharepoint 2013 Custom Web Service получение 401
Добавлен C: \ Inetpub \ Wwwroot \ WSS \ VirtualDirectories \ 80
<location path="_vti_bin/FCWebServices.svc">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
Также добавлено C: \ Program Files \ Common Files \ Microsoft Shared \ Web Server Extensions \ 15 \ ISAPI \ web.config
<location path="FCWebServices.svc">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
Вызов из IE или Chrome соответствующий путь «http://host/_vti_bin/FCWebServices.svc/GetOffCanvasNavigation» - я получаю ожидаемые данные обратно как HTTP 200. Вызов с JQuery $ .ajax называть я получаю 401 (просто вызов самого метода WebService, даже с любыми запросами API SP2013 API).
Я бы хотел, чтобы этот вызов веб-службы был анонимным, и он будет размещен на сайте SharePoint 2013 с открытым доступом.
Вот заголовки дамп веб-запроса: вход
Request URL: http://host/_vti_bin/FCWebServices.svc/GetOffCanvasNavigation
Request Method: OPTIONS
Status Code: 401/Unauthorized
- Request Headers
Accept: */*
Accept-Encoding: gzip, deflate
Access-Control-Request-Headers: content-type, accept
Access-Control-Request-Method: GET
Cache-Control: no-cache
Connection: Keep-Alive
Content-Length: 0
Host: fcit-mcvm2
Origin: file:
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586
- Response Headers
Access-Control-Allow-Origin: *
Content-Length: 16
Content-Type: text/plain; charset=utf-8
Date: Mon, 06 Jun 2016 14:50:50 GMT
Location: /_login/default.aspx?ReturnUrl=%2f_vti_bin%2fFCWebServices.svc%2fGetOffCanvasNavigation
MicrosoftSharePointTeamServices: 15.0.0.4569
request-id: eb85839d-472b-d06e-9fc9-c1e40fcec15a
Server: Microsoft-IIS/8.5
SPIisLatency: 155
SPRequestDuration: 1336
SPRequestGuid: eb85839d-472b-d06e-9fc9-c1e40fcec15a
WWW-Authenticate: NTLM
X-Content-Type-Options: nosniff
X-FRAME-OPTIONS: SAMEORIGIN
X-MS-InvokeApp: 1; RequireReadOnly
X-Powered-By: ASP.NET
Консоль ошибка:
HTTP401: DENIED - The requested resource requires user authentication.
(XHR): OPTIONS - http://host/_vti_bin/FCWebServices.svc/GetOffCanvasNavigation
Любые идеи, что мне нужно сделать, чтобы устранить 401-х?
Марк