Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to publish and host ASP.NET Web Application into IIS

In this article, I am going to explain you how to Publish an ASP.Net web Application and deploy or host the application into IIS. I have created a Sample ASP.Net web application as shown below. I am using visual studio 2012, .net framework 4.0 and IIS (version 7.5).

Now we need to first publish the application. Right click on WebApplication1 and click on Publish as shown below.

Now the new window will open as shown below. Now we need to select or import a publish profile. I am selecting a new profile and giving its profile name as Test as shown below.

After that select File System from publish method drop-down and give path (Ex. E\publish) for Target location as shown below and click on publish.

You will get publish succeeded message in output window as shown below and code will be published as specified location as (Ex. E\publish).

Now the next step is to deploy application into IIS. Go to Run by pressing (Windows+R)and type inetmgr to open IIS as show below.

Now IIS will open. Go to Sites -> Default Web Site and click on Add Application as shown below.

Now the new window will get opened as shown below. Give your application's name (or Virtual Directory name) as Test (in my case), select DefaultAppPool as ASP.NET v4.0 (in our case it is 4.0) and Physical path as E:\publish as we had published.

Now the virtual directory Test will be created. Now the final step is to browse application from IIS as shown below. Go to content View, right click on WebForm1.aspx and browse the application.

Finally, we can see the application in browser as shown below where localhost is the web-server, Test is our application's name and WebForm1.aspx is the page name.



This post first appeared on ASPArticles, please read the originial post: here

Share the post

How to publish and host ASP.NET Web Application into IIS

×

Subscribe to Asparticles

Get updates delivered right to your inbox!

Thank you for your subscription

×