System.InvalidOperationException: MsmqIntegrationBinding failed. The service cannot be started. Binding MsmqIntegrationBinding does not support method signing for a service operation.
I am working from the following example here.
The only parameter I changed is that I need to use the ActiveX serialization format.
Interface
namespace MQTest
{
[ServiceContract]
public interface IMQService
{
[OperationContract(IsOneWay = true, Action = "*")]
void GetData(string value);
}
}
Service
public class MQService : IMQService
{
public static void Main()
{
Uri baseAddress = new Uri("http://localhost:8000/Test/Service");
using (ServiceHost serviceHost = new ServiceHost(typeof (IMQService), baseAddress))
{
serviceHost.Open();
Console.WriteLine("The service is ready.");
Console.WriteLine("The service is running in the following account: {0}",
WindowsIdentity.GetCurrent().Name);
Console.WriteLine("Press <ENTER> to terminate service.");
Console.WriteLine();
Console.ReadLine();
serviceHost.Close();
}
}
[OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = true)]
public void GetData(string value)
{
Console.WriteLine(value);
}
}
App.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<service name="MQTest.MQService">
<endpoint address="msmq.formatname:DIRECT=OS:.\private$\outbound_adt_a08"
binding="msmqIntegrationBinding"
bindingConfiguration="OrderProcessorBinding"
contract="MQTest.IMQService">
</endpoint>
</service>
</services>
<bindings>
<msmqIntegrationBinding>
<binding name="OrderProcessorBinding" serializationFormat="ActiveX">
<security mode="None" />
</binding>
</msmqIntegrationBinding>
</bindings>
</system.serviceModel >
</configuration>
source
share