3

I have an azure VM with IIS and all the required firewall rules for web deploy setup. I can deploy my site if I use my windows admin account, but not with an IIS Manager user.

I think I've created all the necessarily requirements and can also remotely connect to the site at site level using IIS, but deploying fails with the following -

IISWMSVC_AUTHORIZATION_SERVER_NOT_ALLOWED

Only Windows Administrators are allowed to connect using a server connection. Other users should use the 'Connect To Site or Application' task to be able to connect.

Is there a setting I need to change when publishing via VS2015 to force it to connect to site level and not server level?

UPDATE

Forgot to mention that I have also set the delegation permissions as described at https://blogs.msdn.microsoft.com/amol/2011/02/09/allowing-non-admin-users-to-deploy-web-applications-on-iis-7-using-web-deploy-2-0/

1 Answers1

2

I found the solution to my problem here: https://stackoverflow.com/a/23360094/1286665

In short, attach ?site=[YourSiteName] to the MSDeployServiceURL.

I used the Configure Web Deploy Publishing wizard in IIS manager to create a .publishsettings-File. (Right click your site and choose Deploy > Configure for Web Deploy Publishing...) In that wizard I added ?site=[MySite] to the URL for the publishing server connection. The wizard creates a file that can be imported in Visual Studio. (Right click your project, choose Publish and then Import Profile)

According to https://msdn.microsoft.com/en-us/library/dd465337(v=vs.110).aspx you could also provide the full URL to msdeploy.axd?site=[YourSite] in the Service URL field of the publishing wizard in Visual Studio when creating the profile manually.

Or you edit the content of the MSDeployServiceURL-Element in your .pubxml-File:

<MSDeployServiceURL>https://contoso.com:8172/msdeploy.axd?site=[YourSite]</MSDeployServiceURL>

Andreas Pircher
  • 481
  • 4
  • 7