There have been a few questions similar to this, and I am VERY new to MSMQ.
I have been trying to link a ServiceContract and associated DataContract to MSMQ and have set up endpoints so that the DataContact message ends up in MSMQ.
I have verified that the message is being correctly generated by the WCF service and I can also see that messages are in the Journal of the queue I am sending to, but not in the actual Queued Message area where I'd expect them.
I am not using transactions at the moment, and I have set security to none. I attach the relevant code, though my feeling is that I am missing something fundamental through ignorance of MSMQ. Any pointers would be appreciated.
Service & Data Contracts
[DataContract]
public class RegistrationMessage : IRegistrationMessage
{
[DataMember]
public string EMailAddress { get; set; }
[DataMember]
public string FirstName { get; set; }
[DataMember]
public string LastName { get; set; }
}
[ServiceContract]
public interface IRegistration
{
[OperationContract(IsOneWay = true)]
void Register(RegistrationMessage message);
}
app.config of the WCF host
<configuration>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="MetaDataBehaviour">
<serviceMetadata httpGetEnabled="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<netMsmqBinding>
<binding name="msmq"
deadLetterQueue="System" durable="true"
exactlyOnce="false"
receiveContextEnabled="false"
useMsmqTracing="true">
<security mode="None" />
</binding>
</netMsmqBinding>
</bindings>
<services>
<service behaviorConfiguration="MetaDataBehaviour" name="Client.AuthenticationService.RegistrationService">
<endpoint address="net.msmq://localhost/private/AuthenticationQueue"
binding="netMsmqBinding"
bindingConfiguration="msmq" name="msmq"
contract="Global.DomainModel.IRegistration" />
<endpoint address="mex" binding="mexHttpBinding" name="mex" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8080/Registration/" />
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
</configuration>