Home » Development » Publishing ASP.NET web site in Visual Studio and deploying it in IIS

Publishing ASP.NET web site in Visual Studio and deploying it in IIS

Publishing/deploying ASP.NET web sites is easier and more efficient with Microsoft’s deployment tool, called Web Deploy. I will be showing how to publish and deploy a web site step by step.

What you will use is:

  • Visual Studio (the tool in which you develop your web site)
  • Web Deploy (the tool that installs necessary components)
  • IIS (the tool that publishes your web site )

End-to-end steps:

  1. In Visual Studio, Go to “Build > Publish projectname“. In the wizard, configure the settings:
    • Profile: Create a new profile if there is no one exits
    • Connection: Select “Web Deploy Package” in Publish Method list. Choose a path
    • Settings: Keep it as is
    • Preview: Click “Publish”. We will use the zip file in step 3

      Creating "deploy package" in Visual Studio
      Creating “deploy package” in Visual Studio
  2. In the computer that you will publish your web site on IIS, download and install Web Deployhttp://www.iis.net/downloads/microsoft/web-deploy
  3. Open IIS:
    • Create a new web site
    • Click on the web site. Click the link “Import Application
    • Specify the “zip” file you created in step 1

      Importing the application in IIS
      Importing the application in IIS

Yes, that’s all!

Note: If you get an error saying that some dll files are missing (example error message is below), find those files in the computer you use for developing and copy them under C:\inetpub\wwwroot\websitename\applicationname\bin

Some DLL files are missing. You should copy them manually
Some DLL files are missing. You should copy them manually

1 thought on “Publishing ASP.NET web site in Visual Studio and deploying it in IIS”

Leave a Comment