Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Hello,

Please provide me a correct solution. In 1 solution I have a console application, web application and web api whose output type is console application.

I want to host this application in a server please let me know how to publish and host on server.

What I have tried:

I am not getting any idea on how to host on server.
Posted
Updated 31-May-16 23:01pm
Comments
Suvendu Shekhar Giri 1-Jun-16 4:36am    
What is the problem here?
OUTPUT will be shown at the client-end, right?

You want to host the Web API and web application and not the Console Application, right?

Console application is a standalone application, there is no point of thinking about hosting it in the server because that's something impossible , that is never meant for that.

Can you explain in-details about what exactly your need ? Please share brief idea about what your applications do.
Member 11892079 1-Jun-16 4:47am    
Please go through http://damienbod.wordpress.com/2014/03/28/web-api-file-upload-single-or-multiple-files/ where you can know what i am doing in detail.
Suvendu Shekhar Giri 1-Jun-16 4:56am    
Where is the console application in the link you have shared?
Member 11892079 1-Jun-16 5:16am    
Consoleclient is the console application
John C Rayan 1-Jun-16 4:37am    
Do you want to host 3 applications that you have mentioned?. Console application should be running in your client machine. Web App and Web API should be hosted in your server machine.

1 solution

You just need to purchase a subscription from any hosting provider. There are multiple solution providers that provide competing packages for the companies and individuals. You can select from one of them. Since this is ASP.NET, I'd like to say you should go and visit here, ASP.NET Hosting | The ASP.NET Site[^]. Start by having a look at Microsoft's cloud platform. There are other third-party options also provided along with.

I also wrote an article that explains how to do this on your own machines, A simple guide to setting up home server using IIS and ASP.NET[^]. I used a local network for hosting the web application, you can use a static IP address that can map to Internet.

Also as already said in the comments, you just need to host the web application. Console applications are the clients for your web API that would consume the API through proper HTTP requests. You don't need to worry about that. You just have to publish the application. Read that article that I have shared, it would give you an idea how to do that. If you are going to get a third-party solution, chances are that they will guide you through set up also.
 
Share this answer
 
Comments
Suvendu Shekhar Giri 1-Jun-16 5:28am    
:D never thought it could be the issue of OP.
Hope, it helps OP.
Member 11892079 1-Jun-16 6:31am    
I have hosted the web application. Now what about webAPI? without that web application cannot provide the required output.

Thanks for the solution.
Afzaal Ahmad Zeeshan 1-Jun-16 6:33am    
I believe that you understand the fact that web API is the part of your web application. ASP.NET Web API portion is included in the web application itself. How did it miss being published? :-)
Member 11892079 1-Jun-16 6:52am    
I have 1 solution called "WebAPIFileUpload", within this solution there is console application, Web application and webAPI as 3 different projects. When I publish Webapplication, since api is not a part of web application project- webapi is not getting published. But Webapi is a part of "WebAPIFileUpload" solution.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900