Deploying websites/webservices in IIS 7.0

BizTalk has out of the box abilities to expose itself as a web service (exposing as a schema / orchestration) or consume custom web services. The web service wizard is an easy way to setup the web services during development but what if you would like to deploy the web service.

The most obvious way would be to add the virtual directory as a resource to the BizTalk application (for more info follow this link). This way the website will be part of the MSI and will be deployed together with the BizTalk artifacts. An alternative solution would be to use MSDeploy to deploy your web services. MSDeploy is part of the Web Deployment Tool and enables you to package an existing website (including content, configuration, certificates and databases). MSDeploy contains both a command-line interface as a GUI.

Command-line interface example

To package a website the following command should be executed:

Msdeploy.exe –verb:sync –source: iisApp=”Default Web Site\My Sample WebService” –dest:package=”M:\Projects\MySampleWebService.zip”

To import the package on the web server the following command should be executed:

Msdeploy.exe –verb:sync –source:package=”M:\Projects\MySampleWebService.zip” –dest:iisApp=”Default Web Site\My Sample WebService”

GUI interface example

After installation of the Web Deployment Tool a new menu item is available in IIS. Right click the web site/virtual directory that you want to deploy and go to “Manage Packages”.

msdeploy-screenshot


Select “Export Application” to package the web site/virtual directory to a zip file.

To import a package on a web server select “Import Application“.

Source (MsDeploy.Application) and destination (iisApp) are not compatible for given operation

In the RC version of the Web Deployment Tool this error can occur when a package that is exported through the GUI is imported back through the command-line interface. A work-around for this issue is not to mix the command-line interface with the gui interface. If you exported through the GUI then import the package through the GUI also.


Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s