Publishing a c# console application on IIS Server

Is it possible to deploy a console c# application on IIS Server.
I have one .exe file running on a machine which takes data from named pipe and my c# application takes this data from the pipe and send it to the web application running using TCP sockets, I want to know if i can deploy my C# console application on the webserver?
I am new to ASP.net and C#.

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

You can host an exe file on IIS server, but it is not a common practice to deploy C# console applications,

  1. In this way you don’t know if the client machine has proper .NET Framework installed. So the console application may not even launch.
  2. The web browser can simply block the download.
  3. Even if the exe file is downloaded, unless the user launches it locally, it won’t run automatically.

Recommended approach by Microsoft is to deploy the client side application using ClickOnce,

http://msdn.microsoft.com/en-us/library/t71a733d%28v=vs.80%29.aspx

You can then host the ClickOnce installer on IIS side. For example, Microsoft CodePlex uses this kind of deployment for its open source projects,

http://codeplex.codeplex.com/wikipage?title=ClickOnce

Method 2

No, IIS can be used to host only web sites or web applications. You can’t host console applications in IIS.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x