错误信息:“两个不同的合同具有同等ConfigurationName”联在AppFabric的beta 2版本下载从xamlx WSDL时

StackOverflow https://stackoverflow.com/questions/2392975

我得到以下错误消息,当我尝试使用svcutil以产生用于由AppFabric中的β2承载的xamlx文件的客户机代理:

两个不同的合同具有相同ConfigurationName

我理解消息,但是,我无法找到其原因或如何解决它。我继“介绍工作流服务”从VS2010RC培训套件实验室。 Web应用程序有两种服务:SubmitApplication.xamlx和EducationScreening.xamlx。我不知道为什么,但他们都具有四个端点。如果我带经由仪表板的AppFabric在IIS管理工作室看看:

basicHttpBinding (Contract: *)
    (Type: Application(Default))
netNamedPipeBinding (Contract: System.ServiceModel.Activities.IWorkflowInstanceManagement)
    (Type: System (workflowControlEndpoint))
netNamedPipeBinding (Contract: *)
    (Type: Application (Default))
serviceMetadataHttpGetBinding (Contract: serviceMetadataHttpGetContract)
    (Type: System (serviceMetadataEndpoint))

当在浏览器中以看看SubmitApplication.xamlx,我看到以下堆栈跟踪:

[InvalidOperationException: Two different contracts have the same ConfigurationName.]
System.ServiceModel.Activities.WorkflowServiceHost.CreateDescription(IDictionary`2& implementedContracts) +361
System.ServiceModel.ServiceHostBase.InitializeDescription(UriSchemeKeyedCollection baseAddresses) +174
System.ServiceModel.Activities.WorkflowServiceHost.InitializeDescription(WorkflowService serviceDefinition, UriSchemeKeyedCollection baseAddresses) +82
System.ServiceModel.Activities.WorkflowServiceHost.InitializeFromConstructor(WorkflowService serviceDefinition, Uri[] baseAddresses) +206
System.ServiceModel.Activities.Activation.WorkflowServiceHostFactory.CreateWorkflowServiceHost(WorkflowService service, Uri[] baseAddresses) +43
System.ServiceModel.Activities.Activation.WorkflowServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +974
System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +1423
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +50
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +1132

[ServiceActivationException: The service '/HRApplicationServices/SubmitApplication.xamlx' cannot be activated due to an exception during compilation. The exception message is: Two different contracts have the same ConfigurationName..]
System.Runtime.AsyncResult.End(IAsyncResult result) +889824
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +179150
System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +107

谁能告诉我什么,我做错了吗?

我还没有配置任何绑定自己。该basicHttpBinding的是.NET 4托管的Web应用程序中的服务时,默认情况下,你会得到什么。其它绑定由AppFabric的配置。我无法找到它们的配置在任何地方。

<强>更新:的xamlx服务移除的一个(EducationScreening.xamlx)。没有影响。

此致结果 罗纳德Wildenberg先生

有帮助吗?

解决方案

我做了一些进一步的研究,我发现这个问题。 还有的SubmitApplication.xamlx工作流程内的两个ReceiveRequest活动。 他们有两个不同的ServiceContractName的:

{http://contoso.com/hr}IApplicationService
{http://contoso.com/hr/}IApplicationService

我仍然不然而理解消息。 什么是xamlx服务的ConfigurationName? 当我改变ServiceContractName为什么会不同?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top