简体   繁体   English

不支持身份验证方案“ NTLM”,其他问题也从.asmx迁移到wcf

[英]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 我刚刚将.asmx Web服务切换为WCF(均在.NET 3.5中),现在我得到了

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. 我在Google上看到的唯一一件事是某些w3svc / NTAuthenticationProviders设置使用NTML而不是NTLM。 I don't have that issue. 我没有那个问题。

Okay - here is a summary of some annoying WCF issues that I encountered while migrating hopefully it helps someone. 好的-这是我在迁移时遇到的一些烦人的WCF问题的摘要,希望它对某人有帮助。

Issue 1 - "This collection already contains an address with scheme http. There can be at most one address per scheme in this collection." 问题1-“此集合已经包含一个带有方案http的地址。此集合中每个方案最多可以有一个地址。”

This is caused, I guess, by my web server having multiple web sites with multiple host headers. 我猜这是由我的Web服务器具有多个带有多个主机头的网站引起的。 Solution found here: WCF service startup error "This collection already contains an address with scheme http" . 在此处找到解决方案: WCF服务启动错误“此集合已包含一个带有方案http的地址”

I just added a baseAddressPrefixFilter: 我刚刚添加了baseAddressPrefixFilter:

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

Issue 2: I got The authentication scheme ' NTLM' is not supported. 问题2:我得到了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 ): 我为此苦苦挣扎了一段时间,但最终重新启动使它消失了(尽管我也这样做( 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. 问题3:重新启动后,出现有趣的.404错误。

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 ) 我对此的第一个猜测是未将wcf设置为托管在我的服务器上,因此我运行了:( http://msdn.microsoft.com/zh-cn/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 (ie my baseAddressPrefixFilter was causing my 404). 但是404的真正来源是我尝试访问http://yoururl/somewhere.svc而不是http://yoururl.blahblah.com/somewhere.svc引起的(即我的baseAddressPrefixFilter导致了我的404)。

Hope this helps! 希望这可以帮助!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 呼叫清单.asmx取得&#39;http要求是未经授权的客户端身份验证方案&#39;ntlm&#39; - call lists.asmx getting 'http request is unauthorized with client authentication scheme 'ntlm' 不支持NTLM身份验证令牌 - The NTLM authentication token is not supported 使用客户端身份验证方案“ Ntlm”对HTTP请求进行了未授权。从服务器收到的身份验证标头为“ NTLM” - The HTTP request is unauthorized with client authentication scheme 'Ntlm' The authentication header received from the server was 'NTLM' HTTP请求未经授权使用客户端身份验证方案&#39;Ntlm&#39;。 从服务器收到的身份验证标头是“Negotiate,NTLM” - The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'Negotiate,NTLM' 将ASMX服务迁移到WCF服务 - AJAX Post - Migrating ASMX Service to WCF Service - AJAX Post HTTP请求未经授权使用客户端身份验证方案“Negotiate”。从服务器收到的身份验证标头是'NTLM' - The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'NTLM' HTTP 请求未经客户端身份验证方案“Ntlm”授权 - The HTTP request is unauthorized with client authentication scheme 'Ntlm' 客户端身份验证方案“ Ntlm”不允许HTTP请求 - HTTP request is not allowed for client authentication scheme “Ntlm” WCF 中的 NTLM 身份验证调用 .net core API - NTLM authentication in WCF calling .net core API 从WCF到ASMX的错误传播 - Error propagation from wcf to asmx
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM