Header Ads

ASP.NET MVC5: Deployment on Windows IIS Server

Deployment is a mandatory and next step after development of your product. Depend on your application type and technology used; you will package your product accordingly for commercial use. For ASP.NET MVC platform, you need a windows server with IIS manager installed in order to deploy your web application. You can also package your web application in docker environment and then deploy your docker package on any server machine that satisfy the hardware requirement for your web application. Note that docker is independent of local OS environment.

Today, I shall be demonstrating deployment of any ASP.NET MVC5 application on Windows machine with IIS server installed.


Prerequisites:

Following are some prerequisites before you proceed any further in this tutorial:
  1. Enable/Install Microsoft Web Deploy & IIS Server.
You can also watch video tutorial to deploy ASP.NET MVC5 web application on windows machine with IIS server installed.

Watch Now!

Let's begin now.

1) Right click on your ASP.NET MVC5 application inside visual studio and then click "Publish" as shown below i.e.


2) Now select "IIS" option from the left menu and click "Create Profile" button as shown below i.e.


3) Change your publish method to "Web Deploy Package" and provide your package location, then click "Next" as shown below i.e.


4) Click "Save" on next screen as shown below i.e.


5) Now, click "Publish" on publish screen as shown below i.e.


You can see your web application deploy package stored as ".zip" file on your target location as shown below i.e.


6) Now search for "Internet Information Services (IIS) Manager" on your machine and then click it as shown below i.e.


7) Right click on "Application Pool" and then click "Add Application Pool" as shown below i.e.


8) Type your application pool name and configure the settings as shown below and then click "OK" i.e.

You will see that your application pool has been created and started as shown below i.e.


9) Now, right click on "Sites" and then click "Add Website" as shown below i.e.


10) On "Add Website" window, first select your application pool that you have created specifically for your ASP.NET MVC5 web application, click "Select" button, then choose your application pool and then click "OK" as shown below i.e.



11) Now, provide configuration settings on "Add Website" screen and then click "OK" as shown below i.e.


You can see that your empty website is being created on the server as shown below i.e.


12) Right click on "Test" site then click "Deploy->Import Application" as shown below i.e.


13) On "Select Package" screen, provide location path of your published ".zip" web application file and then click "Next" as shown below i.e.


14) On next screen, select all the options and then click "Next" as shown below i.e.


15) Click "Next" on next screen as shown below i.e.


16) Click "Finish" button, your web application has been deployed successfully as shown below i.e.



17) You need to purchase & configure your custom domain name on server, in order to access your web application from web browser using a custom url address. To configure free of cost custom domain name on your local windows machine for custom url address access, follow the steps provided at the end of the video tutorial, link to the video tutorial is provided above in this article. Therefore, after your custom url address configuration, type your url address in the browser and you will be able to access your ASP.NET MVC5 web application, which has been successfully deployed on windows IIS server i.e.


Conclusion

In this article, you will learn to deploy your ASP.NET MVC5 web application on windows machine with IIS server installed. You will learn to publish your ASP.NET MVC5 application as a web deploy ZIP package. You will also learn to add a new application pool on your IIS server and finally, you will learn to add a new website on your IIS server with a custom domain name url address.

No comments