2

I can't seem to be able to deploy my asp.net core RC2 app to Azure when I target the net451 or net46 framework.

When I try to reach my application I get the following error

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

Everything works when I deploy to my local IIS.

The Azure logger gives me

Failed to start process with commandline '%LAUNCHER_PATH% %LAUNCHER_ARGS%', Error Code = '0x80070002'.

I tried replacing %LAUNCHER_PATH% for dotnet and %LAUNCHER_ARGS% for myapp.exe in the web.config but still the same error occur.

Here is my project.json

{
  "dependencies": {
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final",
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final"
  },

  "tools": {
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": {
      "version": "1.0.0-preview1-final",
      "imports": "portable-net45+win8+dnxcore50"
    }
  },

  "frameworks": {
    "net46": {}
  },

  "buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true
  },

  "runtimeOptions": {
    "gcServer": true
  },

  "publishOptions": {
    "include": [
      "wwwroot",
      "web.config"
    ]
  },

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

Thanks

3
  • Check the event log counterpart and see if there is anything interesting there. Turn on logging by setting stdoutLogEnabled to true and stdoutLogPath to \\?\%home%\LogFiles\stdout and see what's in the log. Take a look at my post that provide steps to troubleshoot blog.3d-logic.com/2016/06/08/… Commented Jun 13, 2016 at 5:57
  • Thanks Pawel, I've edited my question to show the result of your suggestion. Commented Jun 13, 2016 at 14:22
  • Did you try to download again the publish profile? Commented Jun 13, 2016 at 21:39

3 Answers 3

2

It seems that updating my web.config to specify the processPath did the trick.

I also had to delete the previous publish attempts for it to work properly.

<aspNetCore processPath=".\myapp.exe" arguments="" forwardWindowsAuthToken="false" stdoutLogEnabled="true"  stdoutLogFile="\\?\%home%\LogFiles\stdout"/>
Sign up to request clarification or add additional context in comments.

Comments

0

With the same symptoms I checked the logs as @Pawel suggested. The logs contained FileNotFoundException which was resolved by adding two dependencies to project.json.

"dependencies": {
  ...
  "System.IO.FileSystem.Watcher": "4.0.0-rc2-24027",
  "System.IO.FileSystem": "4.0.1-rc2-24027"
},

The issue is reported here

Comments

0

Azure doesn't support net461 and use better net451.

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

Publishing SkyIsTheLimit for .NETFramework,Version=v4.5.1/win7-x64

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.