25 October 2014 WebDeploy, IIS, MSDeploy Robert Muehsig

The goal of this post is to enable WebDeploy for Non-Admin & IIS Users.

IIS Requirements

Of course: WebDeploy itself - install this via the Web Platform Installer. Keep in mind that the “Non-Admin” WebDeploy Stuff will only work on Windows Server SKUs.

Make sure you install everything from the Web Deploy Installer!

x

A common problem is that the “Management Service Delegation” is missing. If this is the case, please check if it is installed.

IIS Manager

If everything is installed you should see “IIS Manager Permissions”, “IIS Manager Users”, “Management Service” and the “Management Service Delegation”.

x

IIS Manager: Management Service - “Enable remote connections”

After the installation make sure the Management Service is running and the the default Port 8172 is not blocked on the Firewall and that “Enable remote connection” is checked.

x

IIS Manager: Management Service Delegation

Inside the Management Service Delegation you can create rules for the Deployment. You need this “Delegation” feature because this service is in charge of the actual deployment process. Your “Non-Admin” account has no rights, but with the correct rules the service will make those changes.

x

These rules were already included in my Azure VM, but the most important one is the “contentPath, iisApp”-provider-rule:

x

With this in place you can deploy into an existing application.

IIS Manager: Setup Users and manage the permissions inside the site

Now the basic setup is done and you will need to create users in the “IIS Manager Users”.

x

Now go to you site and add the user to the “IIS Manager Permission” list.

x

Testing with Visual Studio

The best way to test it is via Visual Studio. Make sure you just write the Server name in the “Server” textbox - without HTTP://…. Otherwise you will may see this Error Message “Error Code: ERROR_USER_NOT_ADMIN”. Non-Admin Deployment is only supported via HTTPS, even if the certificate is not valid, the deployment will work, but if you try to connect via HTTP you will get this error. This was a hard learning experience for me.

x

Hope this helps!

Maybe it can help you too.


Written by Robert Muehsig

Software Developer - from Saxony, Germany - working on primedocs.io. Microsoft MVP & Web Geek.
Other Projects: KnowYourStack.com | ExpensiveMeeting | EinKofferVollerReisen.de