简体   繁体   English

在Windows Server 2003上托管WCF Web Serveic

[英]Hosting WCF Web Serveic on Windows Server 2003

Getting the following err... 得到以下错误...

Server Error in '/' Application. “ /”应用程序中的服务器错误。 IIS specified authentication schemes 'IntegratedWindowsAuthentication, Anonymous', but the binding only supports specification of exactly one authentication scheme. IIS指定了身份验证方案“ IntegratedWindowsAuthentication,Anonymous”,但是绑定仅支持仅指定一种身份验证方案。 Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. 有效的身份验证方案为摘要,协商,NTLM,基本或匿名。 Change the IIS settings so that only a single authentication scheme is used. 更改IIS设置,以便仅使用单个身份验证方案。 Description: An unhandled exception occurred during the execution of the current web request. 说明:执行当前Web请求期间发生未处理的异常。 Please review the stack trace for more information about the error and where it originated in the code. 请查看堆栈跟踪,以获取有关错误及其在代码中起源的更多信息。

Exception Details: System.InvalidOperationException: IIS specified authentication schemes 'IntegratedWindowsAuthentication, Anonymous', but the binding only supports specification of exactly one authentication scheme. 异常详细信息:System.InvalidOperationException:IIS指定了身份验证方案“ IntegratedWindowsAuthentication,Anonymous”,但是绑定仅支持仅指定一种身份验证方案。 Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. 有效的身份验证方案为摘要,协商,NTLM,基本或匿名。 Change the IIS settings so that only a single authentication scheme is used. 更改IIS设置,以便仅使用单个身份验证方案。

Source Error: 源错误:

An unhandled exception was generated during the execution of the current web request. 当前Web请求的执行期间生成了未处理的异常。 Information regarding the origin and location of the exception can be identified using the exception stack trace below. 可以使用下面的异常堆栈跟踪来标识有关异常的来源和位置的信息。

Stack Trace: 堆栈跟踪:

[InvalidOperationException: IIS specified authentication schemes 'IntegratedWindowsAuthentication, Anonymous', but the binding only supports specification of exactly one authentication scheme. [InvalidOperationException:IIS指定了身份验证方案'IntegratedWindowsAuthentication,Anonymous',但是绑定仅支持仅指定一种身份验证方案。 Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. 有效的身份验证方案为摘要,协商,NTLM,基本或匿名。 Change the IIS settings so that only a single authentication scheme is used.] System.ServiceModel.Web.WebServiceHost.SetBindingCredentialBasedOnHostedEnvironment(ServiceEndpoint serviceEndpoint, AuthenticationSchemes supportedSchemes) +446264 更改IIS设置,以便仅使用单个身份验证方案。] System.ServiceModel.Web.WebServiceHost.SetBindingCredentialBasedOnHostedEnvironment(ServiceEndpoint serviceEndpoint,AuthenticationSchemes supportSchemes)+446264
System.ServiceModel.Web.WebServiceHost.AddAutomaticWebHttpBindingEndpoints(ServiceHost host, IDictionary`2 implementedContracts, String multipleContractsErrorMessage) +709 System.ServiceModel.Web.WebServiceHost.AddAutomaticWebHttpBindingEndpoints(ServiceHost主机,已实现IDictionary`2Contracts,字符串multipleContractsErrorMessage)+709
System.ServiceModel.Web.WebServiceHost.OnOpening() +203 Microsoft.ServiceModel.Web.WebServiceHost2.OnOpening() in e:\\bt\\3781\\Microsoft.ServiceModel.Web\\Microsoft.ServiceModel.Web\\WebServiceHost2.cs:69 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +229 System.ServiceModel.Web.WebServiceHost.OnOpening()+203 Microsoft:\\ bt \\ 3781 \\ Microsoft.ServiceModel.Web \\ Microsoft.ServiceModel.Web \\ WebServiceHost2.cs:69中的Microsoft.ServiceModel.Web.WebServiceHost2.OnOpening() .ServiceModel.Channels.CommunicationObject.Open(TimeSpan超时)+229
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +121 System.ServiceModel.HostingManager.ActivateService(字符串normalizedVirtualPath)+121
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +479 System.ServiceModel.HostingManager.EnsureServiceAvailable(字符串normalizedVirtualPath)+479

[ServiceActivationException: The service '/Service.svc' cannot be activated due to an exception during compilation. [ServiceActivationException:由于编译期间发生异常,因此无法激活服务'/Service.svc'。 The exception message is: IIS specified authentication schemes 'IntegratedWindowsAuthentication, Anonymous', but the binding only supports specification of exactly one authentication scheme. 异常消息是:IIS指定了身份验证方案“ IntegratedWindowsAuthentication,Anonymous”,但是绑定仅支持仅指定一种身份验证方案。 Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. 有效的身份验证方案为摘要,协商,NTLM,基本或匿名。 Change the IIS settings so that only a single authentication scheme is used..] 更改IIS设置,以便仅使用单个身份验证方案。
System.ServiceModel.AsyncResult.End(IAsyncResult result) +11599786 System.ServiceModel.AsyncResult.End(IAsyncResult结果)+11599786
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +194 System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult结果)+194
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +176 System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication上下文,布尔flowContext)+176
System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +278 System.ServiceModel.Activation.HttpModule.ProcessRequest(对象发送者,EventArgs e)+278
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()+68 System.Web.HttpApplication.ExecuteStep(IExecutionStep步骤,布尔值,已完成,同步)+75

Version Information: Microsoft .NET Framework Version:2.0.50727.3615; 版本信息:Microsoft .NET Framework版本:2.0.50727.3615; ASP.NET Version:2.0.50727.3618 ASP.NET版本:2.0.50727.3618

According to your error above, you have IIS authentication configured on your Windows 2003 machine to allow two different types of authentication (integrated & anonymous). 根据上面的错误,您在Windows 2003计算机上配置IIS身份验证 ,以允许两种不同类型的身份验证(集成身份验证和匿名身份验证)。 Change it to one type of authentication - the one that matches your WCF configuration. 将其更改为一种身份验证类型-一种与WCF配置匹配的身份验证。 I'm guessing you only want anonymous (and not integrated) enabled in the IIS configuration, but that's your design choice.. 我猜您只希望在IIS配置中启用匿名(而不是集成),但这是您的设计选择。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM