Reputation: 18909
I am trying to deploy a site using msdeploy and cannot get it to deploy under an IIS user account. My admin account is able to deploy successfully.
Steps I have taken:
I get the following error back:
Unable to perform the operation. Please contact your server administrator to check authorization and delegation settings.
Upvotes: 25
Views: 8836
Reputation: 2397
As other's have mentioned, it is usually a problem with an expired password for the WDeployConfigWriter
user in Windows Server.
What I usually do when resetting the password and configuring password never expires is not enough:
For Server 2016, Go to Programs and Features
Uninstall for Web Deploy 3.6
Repair
.For Windows Server 2022, go to Programs and Features
Microsoft Web Deploy 4.0
Repair
.Go to IIS Manager
. Then reconfigure Web Deploy for your IIS site: You can change the old Web Deploy user´s password or delete that user and create a new user.
Next, go to Start | Administrative tools | Computer Management.
Then go to Local Users and Groups
- check password never expires
on the user WDeployConfigWriter
You may need to restart IIS completely, after repairing the Microsoft Web Deploy 3.6/4.0.
That usually solves my problem. In Windows Server 2022 I sometimes have having problems deploying .NET 4.8 projects, while .NET (core) 5.0-7.0 will publish.
The Visual Studio failure messages are not very helpful:
1)
An error occurred when the request was processed on the remote computer. The server experienced an issue processing the request. Contact the server administrator for more information
2)
Please contact your server administrator to check authorization and delegation settings
When the 4.8 projects fail, I usually follow 5 steps above, and then restart IIS. Sometimes it works, sometimes it does not.
For times where it does not work, I simply 'Web Deploy' using a built-in Windows Administrator account; in your deployment settings use an account that belongs to the Administrators group and then do the deploy. If you use a built-in IIS Manager account to authenticate, sometimes rights are not propagated properly on the Windows folders structure, which will yield the above errors. You can set permissions manually on the folders, but that can be a pain too getting it right.
Upvotes: 6
Reputation: 1895
Following changes fixed my issue.
Start >> Administrative tools >> Computer Mangement.
There is a user called WDeployConfigWriter. Set to password never expired and updated in IIS as per the below link.
Upvotes: 32
Reputation: 18909
Turns out it was an expired password for the WDeployConfigWriter account.
Upvotes: 52