Monday, June 26, 2017

Error when using WebDeploy with ASP.NET Core

Last week I got into trouble when trying to use msdeploy for an ASP.NET Core app. Where I got no problems for the ‘old’ ASP.NET applications, every time I tried to deploy an ASP.NET Core app I got the following error message:

ERROR_USER_UNAUTHORIZED

I logged in on the target server and find a little bit more information in the Event Viewer:

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.

clip_image002

I was 100% sure that everything was configured correctly on the server. I used exactly the same steps as for my other applications, the only difference was that this was an ASP.NET Core app.

After some testing, I found an approach that worked for me:

Here are the things I had to change inside my Web Deploy pubxml file:

No comments: