Book Image

Learning NServiceBus - Second Edition

By : David Boike
Book Image

Learning NServiceBus - Second Edition

By: David Boike

Overview of this book

Table of Contents (18 chapters)
Learning NServiceBus Second Edition
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Service installation


Throughout this book, we've been testing our service endpoints by running them with NServiceBus.Host.exe as a console process. This is really convenient for development; when we deploy it to a different environment, we need stability in a Windows service. Luckily, NServiceBus makes this ridiculously easy to do. The same NServiceBus host process that runs as a console process during development can install itself as a Windows service with a few simple command-line switches:

> NServiceBus.Host.exe -install [Profile(s)]
                       -serviceName="MyServiceName"
                       -displayName="My Service"
                       -description="Description of MyServiceName"
                       -username="mydomain\myusername"
                       -password="mypassword"

This is the basic command that will install an endpoint as a Windows service, allowing us to set the service name and description, and also to run the service under permissions other than...