c# - Can't get NServiceBus running under custom service account? -


i've created bare-bones nservicebus endpoint (which doesn't now), , when install (using nservicebus.host.exe /install /displayname:"myendpoint"), gets installed service runs under local service, , works perfectly.

now, when change run account windows service own local service account (lets call "svctestaccount" now, has logon service permission), service starts , then unexpectedly stops halfway during initialization.

i can't tell why, since no exceptions logged log4net, process terminates. i've seen behaviour before in previous project when endpoint couldn't access queue needed, time have configured 5 queues endpoint give "everyone" "full control", shouldn't that, right?

what's strange that, when run (using nservicebus.host.exe on production profile), happily runs in following situations:

  • from within visual studio 2012, running local admin.
  • as windows service, running under local service
  • as windows service, running under network service
  • as windows service, running under svctestaccount, if svctestaccount member of local administrators group.
  • from command prompt running under svctestaccount (i.e. "runas /user:svctestaccount cmd" open command prompt, nservicebus.host.exe run endpoint)

the thing doesn't work getting run windows service under svctestaccount (and not being member of local administrators group).

can tell me what's going on?

for completeness sake, endpoint consists of:

public class endpointconfig : iconfigurethisendpoint, asa_publisher, iwantcustominitialization {     public void init()     {         configure.with()             .defaultbuilder()             .log4net();     } } 

and web.config:

<?xml version="1.0" encoding="utf-8" standalone="yes"?> <configuration>   <configsections>     <section name="unicastbusconfig" type="nservicebus.config.unicastbusconfig, nservicebus.core" />   </configsections>    <unicastbusconfig>     <messageendpointmappings>      </messageendpointmappings>   </unicastbusconfig> </configuration> 

i'm using nservicebus 4.3.0 on windows server 2012.

to run nservicebus host different account (not local system) need execute installer /username , /password, eg:

nservicebus.host.exe /install /displayname:"myendpoint" /username:"mydomain\username" /password:"mysecretpassword"

see http://docs.particular.net/nservicebus/the-nservicebus-host#installation more info.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -