Mensaje de error: “dos contratos diferentes tienen el mismo ConfigurationName” al descargar desde WSDL xamlx en AppFabric beta 2

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

Pregunta

me sale el siguiente mensaje de error cuando intento utilizar svcutil para generar un proxy de cliente para un archivo xamlx que está alojado en AppFabric beta 2:

dos contratos diferentes tienen el mismo ConfigurationName

Tengo entendido el mensaje, sin embargo, no puedo encontrar su causa o cómo solucionarlo. Estoy siguiendo la 'Introducción a los servicios de flujo de trabajo de laboratorio' del kit de entrenamiento VS2010RC. La aplicación web tiene dos servicios: SubmitApplication.xamlx y EducationScreening.xamlx. No estoy seguro de por qué, pero ambos tienen cuatro puntos finales. Si tomo una mirada a través del tablero de instrumentos AppFabric en IIS Gestión de Estudio:

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))

Cuando toma un vistazo a la SubmitApplication.xamlx en un navegador, veo el siguiente StackTrace:

[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

Puede alguien decirme lo que estoy haciendo mal?

No he configurado cualquiera de los enlaces a mí mismo. El BasicHttpBinding es lo que hay por defecto en .NET 4 cuando se aloja un servicio dentro de una aplicación web. Los otros enlaces son configurados por AppFabric. No puedo encontrar en cualquier lugar de su configuración.

Actualizar : uno Eliminada de los servicios xamlx (EducationScreening.xamlx). Sin efecto.

Saludos cordiales, España Ronald Wildenberg

¿Fue útil?

Solución

hice una investigación más allá y me encontré con el problema. Hay dos actividades ReceiveRequest dentro del flujo de trabajo SubmitApplication.xamlx. Tenían dos ServiceContractName diferente de:

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

Yo todavía no entiendo el mensaje sin embargo. ¿Cuál es el ConfigurationName de un servicio xamlx? Y por qué es diferente cuando cambio la ServiceContractName?

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top