How to set a shared host as a service in NServiceBus, how do I provide valid credentials?

Imagine that I am creating a .bat file in the following directory:

\ trunk \ Samples \ PubSub \

@ECHO OFF
ECHO installing Subscriber 1
Subscriber1\bin\Debug\NServiceBus.Host.exe /install
pause
ECHO installing Subscriber 2
Subscriber2\bin\Debug\NServiceBus.Host.exe  /install
pause
ECHO starting Subscriber services
net start Subscriber1.EndPointConfig_v1.0.0.0
net start Subscriber2.EndPointConfig_v1.0.0.0
pause

I will be prompted for a username and password, but using my own credentials, I get an exception as follows:

An exception occurred during the installation phase. System.ComponentModel.Win32Exception: account name is invalid or not used ist or password is not valid for the specified account name

  • What powers can I delegate to make this work?

  • Can I configure the credentials as command line arguments for NServiceBus.Host.exe or run as "Local System Account"?

Note:

, (2) -, TopShelf IInstallationConfiguration

Vista MSMQ.

PubSub , , (, ):

@ECHO OFF
ECHO starting Subscriber 1
Subscriber1\bin\Debug\NServiceBus.Host.exe NServiceBus.Integration
pause
+3
2

(2.) NServiceBus.Host.exe " "?

TopShelf NSB , :

, - , TopShelf IRunnerConfigurator.RunAsLocalSystem. NServiceBus , ISpecify.ToRunAsLocalSystem

, , ISpecify.ToRunAsLocalSystem , EndpointConfig.

:

(1.) , ?

, , .

+4

, , :

, (1) .

0

Source: https://habr.com/ru/post/1718722/


All Articles