A
A
ArsenBor662018-12-01 21:06:06
.NET
ArsenBor66, 2018-12-01 21:06:06

How to make the Console Application C# application run on the server?

In general, you need an application written in C # to run 24/7, for this I think you need to install it on the server and actually run it from there. But alas, I don't know where to start. Heard something about VDS.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
G
Griboks, 2018-12-01
@Griboks

Buy a server. Install a server OS on it. Install the .Net Framework on it. Run your console application on it.

A
Alexander Yudakov, 2018-12-02
@AlexanderYudakov

There are three types of applications (executables) in Windows:
- windowed,
- console,
- services. Here is the documentation on
how to make a Windows Service:
https://docs.microsoft.com/en-us/dotnet/framework/...
or here, a simpler option:
https://habr.com/sandbox/97007/
In practice, when developing services, it is more convenient to have three projects (the names are conditional):
1) MyService.dll - all your logic is there;
3) MyServiceTest.exe - console application (used for debugging) - connects dll and starts the main logic from there;
2) MyService.exe - a Windows service (used in production) - also connects the dll and runs the logic from there (but it no longer works as a console application, but as a service).

R
Roman Mirilaczvili, 2018-12-01
@2ord

If you develop under .Net Core, then you can choose hosting on Windows/Linux. Then pay only for the rental of the service.
Search: .net core hosting

O
oldhowl, 2018-12-10
@oldhowl

The easiest way is to take vps rubles for 190/month with ubuntu/centos
. Further, it is not clear what is required from the application. If it should start, work out and die immediately, then here
https://blog.maartenballiauw.be/post/2017/08/01/bu...
If you need interaction (request/response), then it's better through asp.net core
https ://docs.microsoft.com/en-us/aspnet/core/host-...
In any case, in Linux it will be easier today

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question