How to publish ASP.NET web interface without Visual Studio?

How to publish ASP.NET Web API without Visual Studio?

There is an external server where only binary files or the created project should be.

If I publish with a studio on localhost in local IIS, no problem. But now I need to publish it on a remote Windows server, where there is no Visual Studio, just access to IIS and RDP.

I tried to create a new website from the IIS management tool, assign a classic AppPool, assign a new website to a physical path, copy files from Dev PC to this path.

And it just does not work and does not show any errors ... How can I solve this problem?

+6
source share
3 answers

There are a number of publishing mechanisms that you can learn to publish your site without Visual Studio. Out of the box, you can use Publish Profiles, it looks like you have already used this to publish to your local computer, you can expand it to publish it using Web Deploy or FTP, although your web server requires additional services.

Web Deployment: http://www.iis.net/downloads/microsoft/web-deploy

A practical guide. Deploying a web project using one-click publishing in Visual Studio: http://msdn.microsoft.com/en-us/library/dd465337(v=vs.110).aspx p>

After you have selected the publishing engine, you can run the following command to create and publish without Visual Studio:

msbuild MyProject.sln /p:DeployOnBuild=true /p:PublishProfile=ProfileName 

** NOTE: . In the long run, I would recommend that you create and deploy your project on the build server. The above option is suitable for proving a concept or not important projects.

+2
source

Based on the great ideas Tom presented above, you can also create a deployment package from Visual Studio, download the ZIP to the target server, and then manually install it there through IIS Manager. The process is documented for .NET 4.5 at https://msdn.microsoft.com/en-us/library/dd465323(v=vs.110).aspx .

This allows me to separate the build and deployment steps that I need for my use case so that system administrators can deploy my web API application to new servers without having to be familiar with msbuild or Visual Studio. :)

+1
source

I just use Publish with the File System , then all the API files will be output to the target location, and I copy these files to any physical folder of the IIS website on a local or another server, the API can work after rebooting the IIS website.

enter image description here

0
source

All Articles