简体   繁体   中英

Deploying To Azure throws Http Status 500 when from Command Line and works when from VS'17

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 ?

我错过了输出路径。

msbuild MySolution.WebApi /t:Build  /p:Configuration='MyConfig' /p:OutputPath=$outputPath  /P:DeployOnBuild=True /p:UserName='userName'    /p:PassWord='pass' /p:PublishProfile=$publishProfile

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM