0
votes

I have following applications: 1. Azure cloud application (mvc mobile web application) 2. Service Bus Relay application(currently console application)

In this user interacts with the cloud application and then I'm sending data to the relay service which we are going to host it in client premises. Right now all the data interactions are fine. I'm able to save and receive data.

As it is a console app it always run as a command prompt. I would like to convert service bus relay application as a windows service so that I won't get this command prompt window. Our client doesn't want command prompt to be run in their server. Is it possible to convert it as a service? or is there is any other way to do it? I see all the examples using console applications.

Please help.

1
I am looking for a similar thing, except I would like to run the console app as a scheduled task, in order to restart it automatically in case e.g someone accidentally logs out of the server. For some reason, this doesn't work, and I can't seem to find any documentation on it. Did you manage to solve it using a windows service? That might be an option for us as well, although I would prefer scheduled tasks for simplicity.TMan

1 Answers

0
votes

If you're running your app in a Virtual Machine or Cloud Service (web/worker role), you can indeed install a Windows Service. You'd just have to code up the Windows Service shell (start/stop/etc) and incorporate Service Bus code.

If you're running your code as a Web App (in an App Service), then no, you cannot install a Windows Service, as App Service doesn't let you install such software (since everything runs in a sandbox).