Great content delivered right to your mailbox

Thank you! Check your inbox for our monthly recap!

In this companion post to, “How to Install WebDeploy on Windows Server 2012”, we’ll be giving a walk-through of using Visual Studio 2012 to perform an import, or one-click Publish deployments to your Web Deploy enabled IIS8 sites. We’ll also show you how to export your site from within IIS8 Manager.

Let’s begin with an import, or a one-click Application Deployment from Visual Studio 2012 to our Web Deploy enabled website.

I created a new ASP .NET Web Forms Application in Visual Studio 2012 called Gabe Test Application.

ASP .NET Web Forms Application in Visual Studio 2012

In this project, I am going to just leave the defaults. So that it is just the standard .NET Web Form Application template.

.NET Web Form Application

Now we will Publish this application with the one-click using the Web Deploy settings to my test website on the server where we configured Web Deploy.

In Solution Explorer, right-click on your application, and click Publish. This will bring up the Publish Web Wizard:

Publish Web Wizard

Now, remember the Publish file we created earlier when setting up the Web Deploy Publish settings on our site? This is the file we can import here into Visual Studio. Copy this file to your desktop or to a shared location and then click Import… and select the file.

You will then be on the Connection section of the wizard. Notice the Publish method: Web Deploy and that the service URL, Site information, and the Username all match. The only thing we need to do is enter the password for local non-admin user.

Once you type in the password, select Validate Connection. You’ll probably get a Certificate Error, this is ok as we have not configured this. If you have configured a Certificate for your site, you can View Detail to ensure everything matches before proceeding then click Next.

Publish Web Wizard Certificate Error

On the Settings portion of the Wizard, you have the option to specify different SQL server and connection strings. You can even attach a database.

This is extremely useful when deploying from Staging to Production where these values should be different.

Specify SQL Server

On the Preview page, click Start Preview and here you will see what files will be added to the destination.

Publish Web Preview

Once you click Publish, the Output section of Visual Studio will update you on the progress, notice this build succeeded!

Visual Studio Output

Now on the server, I can confirm that this was successfully pushed:

IIS Manager

Now if I wanted to export this site from IIS Manager, I would right-click the site > Deploy > Export Application. This launches the Export Application Wizard. As you can see it will select everything associated with my site.

IIS Export Application Package

Need to encrypt your package? Just click Advanced Settings… and set a password:

IIS Advanced Settings

Click Next, here you can edit the current parameters by selecting the Provider Path or you can Add Parameters if needed (Database strings). These settings look familiar, as just with Visual Studio, you can make changes to these options.

IIS Export Application Package 1

Next specify where to save your application:

IIS Export Application Package Save Package

When you click Next it will start the Export. When it is completed, take a look at the zip file:

IIS Export Application Package ZIP

The Content folder will contain your application from the root folder level, and the XML files are used in an Import. You can now Import this site to another IIS server that is configured for Web Deploy by using the Deploy > Import Application function. Then, ensure the zip file is in a location the destination server has access and point the Import Wizard to your zip file.

To recap, WebDeploy can help developers manage and publish their sites/applications. You can:

-Quickly and easily publish your sites via one-click from Visual Studio
-You can export your site and move it to another server with a simple wizard to zip file

For further information on Visual Studio and one-click deployment, check out the MSDN article: 

We hope you found the above information to be useful in using Visual Studio 2012 to perform an import, or one-click Publish deployments to your Web Deploy enabled IIS8 sites. To learn more about how we perform these types of solutions for our Dedicated, Cloud and Hybrid Hosting clients, give us a call at 1-855-780-0955, or shoot us an email at

Written by Gabriel Beaver Employee @ SherWeb

Gabriel is a Virtualization Specialist on the Infrastructure team at Sherweb. He has been in the industry for nearly 10 years, with an extensive background supporting desktop and server issues, datacenter deployments, System Center products, VPN tunnels, and everything in between. When he is not chasing around his three children, you can find him tinkering with ownCloud, Windows and Linux servers, blogging, or playing FIFA seasons online.