wcf window 验证此服务的安全设置需要 Windows 身份验证,但没有为驻留此服务的 IIS 应用程序启用该身份验证。

WindowsXPaccp 2008-10-10 12:56:23
wcf 中的配置节
<bindings>
<webHttpBinding>

<binding name="bingingManagerInfo">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" />
</security>
</binding>
</webHttpBinding>
</bindings>


此服务的安全设置需要 Windows 身份验证,但没有为驻留此服务的 IIS 应用程序启用该身份验证。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.NotSupportedException: 此服务的安全设置需要 Windows 身份验证,但没有为驻留此服务的 IIS 应用程序启用该身份验证。

源错误:

执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

堆栈跟踪:

[NotSupportedException: 此服务的安全设置需要 Windows 身份验证,但没有为驻留此服务的 IIS 应用程序启用该身份验证。]
System.ServiceModel.Channels.HttpChannelListener.ApplyHostedContext(VirtualPathExtension virtualPathExtension, Boolean isMetadataListener) +4074379
System.ServiceModel.Activation.VirtualPathExtension.ApplyHostedContext(TransportChannelListener listener, BindingContext context) +71
System.ServiceModel.Channels.HttpTransportBindingElement.BuildChannelListener(BindingContext context) +112
System.ServiceModel.Channels.BindingContext.BuildInnerChannelListener() +63
System.ServiceModel.Channels.MessageEncodingBindingElement.InternalBuildChannelListener(BindingContext context) +67
System.ServiceModel.Channels.WebMessageEncodingBindingElement.BuildChannelListener(BindingContext context) +47
System.ServiceModel.Channels.BindingContext.BuildInnerChannelListener() +63
System.ServiceModel.Channels.Binding.BuildChannelListener(Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode listenUriMode, BindingParameterCollection parameters) +128
System.ServiceModel.Description.DispatcherBuilder.MaybeCreateListener(Boolean actuallyCreate, Type[] supportedChannels, Binding binding, BindingParameterCollection parameters, Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode listenUriMode, ServiceThrottle throttle, IChannelListener& result, Boolean supportContextSession) +152
System.ServiceModel.Description.DispatcherBuilder.BuildChannelListener(StuffPerListenUriInfo stuff, ServiceHostBase serviceHost, Uri listenUri, ListenUriMode listenUriMode, Boolean supportContextSession, IChannelListener& result) +808
System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost) +1387
System.ServiceModel.ServiceHostBase.InitializeRuntime() +37
System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) +63
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +268
System.ServiceModel.Channels.CommunicationObject.Open() +30
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +104
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +498

[ServiceActivationException: 由于编译过程中出现异常,无法激活服务“/TdxWeb/WCFService/ManagerService.svc”。异常消息为: 此服务的安全设置需要 Windows 身份验证,但没有为驻留此服务的 IIS 应用程序启用该身份验证。。]
System.ServiceModel.AsyncResult.End(IAsyncResult result) +4413209
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +183
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +205
System.ServiceModel.Activation.HttpHandler.ProcessRequest(HttpContext context) +77
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
...全文
671 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
无双歌 2010-03-26
  • 打赏
  • 举报
回复
你的错误跟我一模一样,我今天刚解决,所以给你贴上来参考下,希望对以后遇到这种问题的朋友有所帮助。
解决方法:
该错误是IIS6.0的Bug,处理方式为:进入C:\WINDOWS\system32\inetsrv目录,找到MetaBase.xml文件,更改所有NTAuthenticationProviders="NTLM"为NTAuthenticationProviders="Negotiate,NTLM"。

参考地址:http://blogs.msdn.com/appsec/

8,735

社区成员

发帖
与我相关
我的任务
社区描述
WPF/Silverlight相关讨论
社区管理员
  • WPF/Silverlight社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧