Skip to main content

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 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

How to downgrade from Windows 8 to Windows 7 on a computer has GPT (partition type) and UEFI (instead of BIOS)

New laptops are sold with Windows 8. You might think of downgrading it to Windows 7 by simply formatting like the old days.  Bad news! There are some challenges waiting for you!

Firstly, log in to Windows 8 and insert Windows 7 media. Try downgrading it by the wizard. If you can’t manage to install it and have GPT related issues, continue reading.

  • First challenge: There is no BIOS anymore! UEFI replaces it. “Secure boot” which is a feature of UEFI will prevent you booting from your Windows 7 DVD.
  • Second challenge: Even you successfully boot from Windows 7 DVD, you won’t be able to install Windows because the disk partition table is GPT, not MBR.


  • Solution for the first challenge: Disable “Secure boot”.
    You need to change UEFI settings.

    1. Follow these instructions to get into UEFI settings:

      Disable “Secure Boot”


    2. While you are in UEFI settings screen, give boot priority to “Legacy Support” and “Legacy First
    3. Change boot order. Move “DVD-ROM” to up (as it was in the old days…)

      Legacy Support and Boot Order
    4. Finally, you will be able to boot from whatever media you want
  • Solution for the second challenge: Change the partition table from GPT to MBR
    Normally, you can change the partition table in Disk Management in Windows. In this case, you can’t do it because there will be only one disk and you cannot change the partition type of the disk your OS is installed in it. Instead, follow these steps:
    1. Download a “live CD” such as Ubuntu, Knoppix, Ophcrack which will give you the opportunity of having an operating system without formatting the disk.
    2. Burn the ISO file to CD and boot your computer from it
    3. Open Disk Management Utility of the system you use. For example, it is called “Disk Utility” in Ubuntu or “GParted Partition Editor” in Ophcrack.
    4. Change the partition type as MBR or msdos (Name might be different depending on the management software)
    5. Restart your computer and boot from Windows 7
Changing partition type in Ubuntu
Changing partition type in Ophcrack