2

I was reading an article How to create your own auto direct message Twitter bot for free. It uses Twitter's streaming API and NodeJS to send the auto DM. It uses Heroku to host the NodeJS app.

I was wondering that I can create same application in C# as a console app, but how can I host it on cloud or PaaS provider? If I have AWS EC2/Azure Windows VM then I can run the app forever on it and it will send auto DM but is there any PaaS provider which allows me to host continuously running C# console app?

PS : I am not talking about .NET Core. This is normal .NET based C# Windows console app. If there is solutions in .NET Core I would be happy to know.

Farhan Ghumra
  • 15,180
  • 6
  • 50
  • 115

3 Answers3

0

If docker is an option for you: You could put your application into an Mono-Docker Container and deploy it on a docker host. As a simple example: https://thenewstack.io/getting-started-with-mono-on-docker/

Scudi
  • 3
  • 3
0

"Azure Function" is the most effective solution to run this program as PaaS on Azure. Since it is a console app and background process. We can get below benefits by doing this on Azure Function, 01. Less cost - we can configure "consumption" hosting plan. 02. We don't need to worry much about hosting. We can directly do the codes on online editor. https://learn.microsoft.com/en-us/azure/azure-functions/functions-create-first-azure-function

Inzi
  • 348
  • 3
  • 12