Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

[error]Process 'appcmd.exe' exited with code '87'

Tags:

deployment

I am new to tfs-2018, I am trying to do deploy on one of my servers but getting below error in the log. I was able to deploy on other 2 systems but one system is giving the bellow error. Any help will be appreciated

Log:

2018-01-29T06:55:20.8002862Z ##[section]Starting: IIS Web App Manage 2018-01-29T06:55:20.8484384Z ==============================================================================

2018-01-29T06:55:20.8484384Z Task : IIS Web App Manage 2018-01-29T06:55:20.8484384Z Description : Create or update a Website, Web App, Virtual Directories, and Application Pool 2018-01-29T06:55:20.8484384Z Version : 0.4.4 2018-01-29T06:55:20.8484384Z Author : Microsoft Corporation 2018-01-29T06:55:20.8484384Z Help : More Information 2018-01-29T06:55:20.8484384Z ==============================================================================

2018-01-29T06:55:24.2725407Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" list app "Default Web Site/PDM" 2018-01-29T06:55:24.4872952Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" set app /app.name:"Default Web Site/PDM" -[path='/'].physicalPath:"E:\inetpub\wwwroot\PDM" -[path='/'].userName: -[path='/'].password: 2018-01-29T06:55:24.7066288Z APP object "Default Web Site/PDM" changed 2018-01-29T06:55:24.7066288Z ERROR ( hresult:80070057, message:Failed to commit configuration changes.
2018-01-29T06:55:24.7998202Z 2018-01-29T06:55:24.7998202Z The parameter is incorrect. 2018-01-29T06:55:24.7998202Z 2018-01-29T06:55:24.7998202Z ) 2018-01-29T06:55:25.1905059Z ##[error]Process 'appcmd.exe' exited with code '87'. 2018-01-29T06:55:25.3169881Z ##[section]Finishing: IIS Web App Manage

Below is the configuration details attached.

enter image description here

enter image description here

like image 654
Kapil Gupta Avatar asked Jan 29 '18 07:01

Kapil Gupta


2 Answers

I had similiar symptoms at one Windows Server 2012 R2 - on all other Windows Server 2012 R2 it would work.

Symptoms

"C:\Windows\system32\inetsrv\appcmd.exe"  set app /app.name:"Default Web Site/foo" -applicationPool:"foo" -[path='/'].physicalPath:"C:\temp\foo" -[path='/'].userName: -[path='/'].password:

ERROR ( hresult:80070057, message:Failed to commit configuration changes. 
The Parameter is incorrect.
)

We tried to figure out what was happening, and found that the appcmd.exe password Parameter would not work.

When omitting the password parameter the command would work fine:

"C:\Windows\system32\inetsrv\appcmd.exe"  set app /app.name:"Default Web Site/foo" -applicationPool:"foo" -[path='/'].physicalPath:"C:\temp\foo" -[path='/'].userName:

Another symptom that led us to the root of the problem was:

specifying Physical Path credentials for a VirtualDirectory via the mgmnt-console would also not work.

Solution

For us, the problem was with a corrupt IIS Configuration Key. That prevented us from encrypting passwords in the applicationhost.config

We fixed the problem by importing the IIS Configuration Key from another test-machine.

Reinstalling IIS would have worked as well (if we ever had that problem on a production server)

Exporting the config key from a working IIS Server:

aspnet_regiis -px "iisConfigurationKey" "C:\temp\iisConfigurationKey.xml" -pri

Importing the config key at the renitent IIS Server:

aspnet_regiis -pi "iisConfigurationKey" "C:\temp\iisConfigurationKey.xml" 

Replace AesProvider Element

Finally we replaced the AesProvider Provider Element from applicationHost.config configProtectedData Section with the element from the working IIS Server and restarted the IIS.

like image 87
mhaslhofer Avatar answered Nov 15 '22 11:11

mhaslhofer


Buried in there you will see The parameter is incorrect. which is what Microsoft’s standardized error code 87 means.

In my case the list of urls was wrong (I wasn’t delimiting them correctly with colons, or the wildcards were incorrect). Looking at yours, I don’t see an equivalent field. But try simplifying the fields you have specified until you get something working, then add the real values back gradually.

like image 28
Sridhar Sarnobat Avatar answered Nov 15 '22 10:11

Sridhar Sarnobat