2

There is a simple handler created, hosted in SharePoint site. For that handler and for affected lists Anonymous Access is configured. Everything is working smoothly when I submit a POST request without authentication and without Content-Type header. BUT when I add Content-Type: application/soap+xml; charset=utf-8, SharePoint server return 401 Unauthorized error and also requests NTLM authentication mode. But it should accept anonymous requests. It fails only when Content-Type is application/soap+xml. Request:

POST https://listetner.ashx HTTP/1.1
Content-Type: application/soap+xml; charset=utf-8
Host: myhost.com
Content-Length: 527
Expect: 100-continue
Accept-Encoding: gzip, deflate
Connection: Keep-Alive

<s:Envelope>content</s:Envelope>

Response:

HTTP/1.1 401 Unauthorized
Cache-Control: private
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/7.5
SPRequestGuid: b8dea544-2792-4dfd-bd88-98c8dab71e62
X-SharePointHealthScore: 0
X-AspNet-Version: 2.0.50727
WWW-Authenticate: NTLM
X-Powered-By: ASP.NET
MicrosoftSharePointTeamServices: 14.0.0.6123
X-MS-InvokeApp: 1; RequireReadOnly
Date: Wed, 16 Dec 2015 21:08:31 GMT
Content-Length: 16
Proxy-Support: Session-Based-Authentication

401 UNAUTHORIZED

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.