I am trying to deploy to Azure using Command Line:
nuget restore MySolution.sln
msbuild MySolution.WebApi /P:DeployOnBuild=True /p:UserName='userName' /p:PassWord='pass' /p:PublishProfile=$publishProfile
the deploy works fine, no errors are thrown. When checking the API, I get the following error :
**HTTP Error 500.0 - Internal Server Error**
* IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
* IIS was not able to process configuration for the Web site or application.
When I use the VS 17 to deploy the APP using the same publish profile, I can verify that the API throws no errors. Its working fine.
Well, I checked Web.Config, App.json and buildConfig.json, they are all the same.
What else could cause this kind of situation ?
I was missing an Output Path.
msbuild MySolution.WebApi /t:Build /p:Configuration='MyConfig' /p:OutputPath=$outputPath /P:DeployOnBuild=True /p:UserName='userName' /p:PassWord='pass' /p:PublishProfile=$publishProfile