Local IIS – Deploy an ASP .NET application

deploy-asp-net-local-iis

Deploy an ASP .NET application to the local IIS server is the first challenge that we face after having developed. In order to run an ASP .NET application, you need to host it in a virtual folder of an IIS Server.

During the development phase we usually don’t have any external IIS already setup. So the first thing to do is to deploy the application to an internal IIS server. The example that I’m going to illustrate it is a very practical one, that will go straight to the point.

A practical example

Just for clarity, my working OS environment will be Microsoft Windows Server 2012 R2 Datacenter with Microsoft Internet Information Services (IIS) 8.

The first thing to do to deploy the application is to create the virtual folder on the IIS Server. By default the local IIS Server root folder is in the C drive. The usual path is C:\inetpub\wwwroot.

Let’s create in this “wwwroot” folder a new subfolder “truongtong” that will be containing all the files of our ASP .NET application. It will be our root folder.

Now we open IIS 8. In the left Pane “Connections”, we can now navigate to the Default Web Site application pool that is in the “Sites” folder.

Right-click on the “Truongtong” folder and then we select “Convert to Application” and we just click ok in the next window.

The icon of the folder will now switch to another one and we are ready to go. Let’s move now all the files to the truongtong folder.

We can now open our Web Browser and navigate to the application by typing localhost/Truongtong in the address bar.

Be the first to comment

Leave a Reply

Your email address will not be published.


*