ASP.NET MVC project to push to a remote server

Viewed 586

I have a ASP.NET MVC project locally, but want to push to a remote server so that others can use that website. I have login access to the remote server. Is this what i need to do?

1) add a folder to IIS in the remote server 2) copy my files to the folder on remote server. If so, which files should i copy?

2 Answers

If you're using Visual Studio (not code) then right click on the project and select publish, then select the options to publish to a local folder. Copy all files in your published folder to your server.

If you're using ASP.NET Core then you can also navigate to the project folder and use the following command

dotnet publish -c Release -o PUBLISH_PATH_HERE

You will need to ensure that the server has your version of .NET runtime installed.

Create a release publish profile, publish, grab the files from the directory it published to. This is the simplest way. You can automate this process if you have many releases. For example publishing directly to the server or checking code into a source control of some kind and having it publish to the server.

Related