我想設置一個WCF服務來處理毒隊列消息,我正在努力這樣做。我已經配置了一個WCF服務爲:處理自我託管的WCF/MSMQ中毒隊列消息
<endpoint address="net.msmq://serverip/private/services/eventservice.svc;poison"
binding="netMsmqBinding"
bindingConfiguration="MsmqBindingTransactionalSecurityPoisonHandling"
contract="App.IEventService" />
我綁定的配置是:
<binding name="MsmqBindingTransactionalSecurityPoisonHandling" exactlyOnce="true" durable="true">
<security mode="None" />
</binding>
不過,我得到這個錯誤:
Cannot detect if the queue is transactional.
而且
An error occurred when converting the 'serverip\private$\services/eventservice.svc;poison' queue path name to the format name: The queue path name specified is invalid. (-1072824300, 0xc00e0014). All operations on the queued channel failed. Ensure that the queue address is valid. MSMQ must be installed with Active Directory integration enabled and access to it is available.
隊列路徑名稱有效,MSMQ與Active Directory集成已啓用,所以我不明白爲什麼發生錯誤?
編輯:我對有害隊列處理服務的定義如下:
<ServiceBehavior(AddressFilterMode:=AddressFilterMode.Any, InstanceContextMode:=InstanceContextMode.Single, ConcurrencyMode:=ConcurrencyMode.Single)>
Public Class EventService
Implements IEventService
<OperationBehavior(TransactionScopeRequired:=True, TransactionAutoComplete:=True)>
Public Sub ProcessEvent(msg As EventMessage) Implements IEventService.ProcessEvent
End Sub
End Class
根據錯誤消息,您在隊列路徑中混合了正斜槓和反斜槓。這是一個錯字嗎? –
MSMQ上的WCF只使用正斜槓;它會被翻譯。例如,我成功地通過net.msmq://serverip/private/services/eventservice.svc發出連接到主隊列的服務請求。這只是我不知道的毒素子隊列連接。 –