0
votes

There is no error in publish or deploy script, but after deploy is done, navigating to website says :

The specified CGI application encountered an error and the server terminated the process.

The possible cause for this would be this : which was not happening while I was using dnx publish commands. I verified from previous console logs that this warning is new.

Could not find file 'D:\TempPublish\approot'. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#FileOrFolderNotFound. Info: Using ID '8zsdwee------------b7a299fe6' for connections to the remote server. Warning: Skipping source contentPathLib (D:\TempPublish\approot) because of rule SkipInvalidSource. Could not find file 'D:\TempPublish\approot'. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#FileOrFolderNotFound.

Publish Command :

"C:\Program Files\dotnet\dotnet.exe" publish "C:\Program Files (x86)\Jenkins\workspace\Temp Publish\Site.Web" --framework net451 --output "D:\TempPublish" --configuration Release

Since approot folder is not getting created, msdeploy command is executting successfully but not working after deploy is done.

MsDeploy Command :

"C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" -source:IisApp='D:\TempPublish\wwwroot' -dest:IisApp='hhhhhhhh',ComputerName='https://xxxx-zxxx.scm.azurewebsites.net/msdeploy.axd',UserName='$xxxxx',Password='yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy',IncludeAcls='False',AuthType='Basic' -verb:sync -enableLink:contentLibExtension

Project.Json - Post-Publish Script :

"scripts": { "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] }

What could possibly be wrong here ?

Thanks for your help.

2

2 Answers

1
votes

To me it looks like the PublishProfile pubxml and/or ps1 have changed from RC1 to RC2.

I deleted the contents of my local PublishProfiles folder, re-downloaded the publishing profile for the Web App from Azure Portal, imported it using the Publish wizard in Visual Studio, and the publish succeeded.

0
votes

Ok, I found the answer after a lot of struggle. And believe me you will feel stupid after seeing it.

The problem was not at publish script rather in deploy script, was searching for wrong path.

Correct Command :

"C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" -source:IisApp='D:\TempPublish\' -dest:IisApp='xyztwee__testing',ComputerName='https://xxxx-zzzzz.scm.azurewebsites.net/msdeploy.axd',UserName='$xyztwe__testing',Password='LOL53encrypted7beyond9your4limit5Dont70waste87Time',IncludeAcls='False',AuthType='Basic' -verb:sync -enableLink:contentLibExtension

Notice the source path, source:IisApp='D:\TempPublish\' Instead of 'D:\TempPublish\wwwroot' searching for wwwroot folder inside published folder just provide the published folder as source.

Hope this helps someone and saves some time.