The authentication scheme ' NTLM' is not supported and other issues migrating from .asmx to wcf

I just switched my .asmx web service to WCF (both in .NET 3.5), and now I am getting

The authentication scheme ' NTLM' is not supported. 

The only thing I've seen on google is where some w3svc/NTAuthenticationProviders setting had NTML instead of NTLM. I don't have that issue.

Answers


Okay - here is a summary of some annoying WCF issues that I encountered while migrating hopefully it helps someone.

Issue 1 - "This collection already contains an address with scheme http. There can be at most one address per scheme in this collection."

This is caused, I guess, by my web server having multiple web sites with multiple host headers. Solution found here: WCF Error: This collection already contains an address with scheme http.

I just added a baseAddressPrefixFilter:

<serviceHostingEnvironment>
    <baseAddressPrefixFilters>
        <add prefix="http://yoururl.blahblah.com/" />
    </baseAddressPrefixFilters>
</serviceHostingEnvironment>

Issue 2: I got The authentication scheme ' NTLM' is not supported. error. I struggled with that for a while but eventually a reboot made that one go away (although I also did this (http://bytes.com/topic/net/answers/705912-authentication-scheme-ntml-not-supported):

# change directory to c:\inetpub\admin scripts first
cscript adsutil.vbs set w3svc/NTAuthenticationProviders "Negotiate,NTLM"

There was a space after the first comma in my config, no idea if that was causing an issue.

Issue 3: After a reboot, I got fun .404 errors.

My first guess at this was that wcf was not set up to be hosted on my server so I ran: (http://msdn.microsoft.com/en-us/library/ms732012.aspx)

serviceModelReg.exe -i

But the real source of the 404 was caused by me trying to go to http://yoururl/somewhere.svc instead of http://yoururl.blahblah.com/somewhere.svc (i.e. my baseAddressPrefixFilter was causing my 404).

Hope this helps!


Need Your Help

Git push keep getting permission denied after mac 10.9.2 update

git osx-mavericks

Wondering if anyone experiencing the same issue with OSX 10.9.2 Update. After installing that update, I couldn't do git push anymore, keep getting permission denied(public key).

Compute matrix product in base sas ( not using IML)

matrix sas

In order to Compute the product of 2 matrices I am using this method:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.