I have developed a C# application in M$ Windows which is a service. I have used a Webform in this application. My precise problem is that my Internet service provider keeps signing out very frequently. So I have written this application to frequently check for internet connectivity and if the session has expired [internet connectivity is lost] it opens my service providers page automatically and logs in.
Though I have changed my OS from Windows to Suse I do not know how to execute this C# application to run as a service in Linux.
If I understand correctly, you wrote the app and compiled under Windows(an executable).As far as I know and someone correct me if I’m wrong C3 is a part of .NET which is Microsoft centric. There might be tools on Linux which might be able to compile your code with specifics to Linux OS, but someone else could give you that info. Now it depends on the libraries which are used that it might be portable if not you will have to rewrite it in C, C++, Java, etc. Or you just start from scratch with this and rewrite it with the tools you have in here, even a shell script might do a reconnection for you, and the script to be added to crontab. Good luck and don’t forget that this is a new world “Linux” and there are lots of challenges in it, but that’s you are in here.
You can’t just port a C# application from Windows to Linux, especially something as OS-centric as a Windows Service. However, you could make a copy of your source code files and put them in a Mono C# application. I am not sure what version of SUSE you’re running, but 11.1 includes Mono 2.0 in YAST.
I’ve created Windows and ASP.NET applications but not services. I suppose these would map to cron jobs in Linux. When I open Mono Develop IDE I do not see a service project, however you may be able to do it with a blank project. Also there are no Windows projects. I have a Gnome Project, which maps to a Windows-type form interface.
You could always create an executable in Mono and then set up a cron tab for it.
The Mono project is constantly evolving so you may want to look around on their web site. Main Page - Mono