質問

I've got a MVC application that has a custom-login. After logging into the webapplication a display name is set to the username to use within the application.

When I try to connect to a Queue I recieve an exception that the messagequeue can't resolve my username. I would like the messagequeue to be connected by the ApplicationPool Identity or the Site Identity instead of the login-user from the application. How can I configure rebus to use a different user (set credentials for ex.)?

The error gives my the following stacktrace:

 at System.Messaging.AccessControlList.MakeAcl(IntPtr oldAcl)
   at System.Messaging.MessageQueue.SetPermissions(AccessControlList dacl)
   at Rebus.Shared.MsmqUtil.EnsureMessageQueueExists(String path)
   at Rebus.Transports.Msmq.MsmqMessageQueue..ctor(String inputQueueName, Boolean allowRemoteQueue)
   at Rebus.Transports.Msmq.MsmqConfigurationExtension.DoIt(RebusTransportConfigurer configurer, String inputQueueName, String errorQueueName)
   at Rebus.Transports.Msmq.MsmqConfigurationExtension.UseMsmqAndGetInputQueueNameFromAppConfig(RebusTransportConfigurer configurer)
役に立ちましたか?

解決

The error stacktrace indicates that you got the exception during the initialization of Rebus, which should be done when your web application starts up (and once only).

Are you initializing Rebus outside of the application's startup code?

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top