Quantcast
Viewing all articles
Browse latest Browse all 21070

WCF cannot connect to SharePoint server (web services): The request is unauthorized with 'Negotiate'... header received from the server was 'Negotiate,NTLM'.

Hello,

First, I realize that there are about a thousand similar problems on the forums and around the internet. I've googled, searched the forums, etc. None of the "solutions" (if you can call them that! One of them said to reinstall SharePoint. Hah!) have worked (or they were irrelevant).

I have a WCF client in an application that accesses SharePoint. Previously we were using SharePoint 2010 (and 2007) and those two didn't have an issue, but as soon as we moved to SharePoint 2013, we started seeing problems. We are completely unable to set up IIS in such a way as to allow users to access the web console as well as my application to access the web services, but at some point, we had (finally) set it up so that the web services could be accessed (again: users could never log in - that's messed up, but "ok"). Even back then, I noticed many problems with IIS / SharePoint.*1 (see below)

Yesterday, I was given the task to troubleshoot something on this SharePoint server. I remember messing this server up about 3 times previously (requiring complete re-installation - see *1), so this time I was smart: I made a snapshot of the machine (it's a VM) before I started. After this was done, I messed around with the IIS settings, broke the server (as expected), and reverted to the previous snapshot. It started working again, and I started messing around with IIS again. Again, the server stopped working (as in, the "Negotiate / Negotiate,NTLM" error message), so - again - I reverted the server to the snapshot.

Unlike the initial revert, the server still doesn't work. It still doesn't accept my Negotiate authentication attempts:

The HTTP request is unauthorized with client authentication scheme 'Negotiate'.
The authentication header received from the server was 'Negotiate,NTLM'.

My "plan" to deal with this particular issue was to revert the VM back, but now that that isn't working, I need to actually understand and fix the problem. I've attached some screenshots below. Note that the WCF client in my application is set up to use Windows authentication (obviously, since it's passing "Negotiate") with "Impersonate" (couldn't get the SharePoint 2010 stuff working without this - don't know why). I can post some code, but there's nothing too interesting besides the fact that I always see references to "app.config," which I do not have anywhere - the client is configured in the code.

*1 For instance, "Windows Authentication" providers were set to "Negotiate" and "NTLM" (great!). I would go in and move NTLM up on the list, save the settings, and it would stop working. So, OK, don't do that, right? I go back in, move NTLM back down on the list, save the settings. I'm expecting it to work, but my WCF application throws errors. I believe, from what I recall, it was the same error I'm seeing today. The point is, I know exactly how fragile (and ridiculous - how does reverting the settings NOT fix the problem?) this server is.


Viewing all articles
Browse latest Browse all 21070

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>