0

I want to deploy my .NET Core MVC application in an azure WebService. I have built the app locally with

dotnet publish

and moved the output code with the Kudu service in my wwwroot directory but the wabapp just gives me the errorpage:

deploy .NET Core CLI MVC application to azure web service

What am I doing wrong?

5
  • Are you using Visual Studio? If so, you should follow this guide: Publish an ASP.NET Core web app to Azure App Service using Visual Studio Commented Oct 26, 2017 at 12:50
  • where exactly do you see this error message "deploy dotnet core cli mvc application to azure webservice"? Commented Oct 26, 2017 at 17:37
  • no im using dotnet core cli and visualstudio code Commented Oct 26, 2017 at 18:22
  • did you see a "web.config" file under wwwroot directory after you copy over the bits? Commented Oct 26, 2017 at 18:54
  • no there is not a "web.config" file. Commented Oct 26, 2017 at 23:00

1 Answer 1

1

I tried with a sample project:

D:\dotnetDummy>dotnet publish
Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  dotnetDummy -> D:\dotnetDummy\bin\Debug\netcoreapp2.0\dotnetDummy.dll
  dotnetDummy -> D:\dotnetDummy\bin\Debug\netcoreapp2.0\publish\  <-- output directory

after publishing locally, you want to move all files under output directory to wwwroot folder of your azure webapp, in this case your D:\home\site\wwwroot on Kudu site should look the same as D:\dotnetDummy\bin\Debug\netcoreapp2.0\publish

D:\dotnetDummy\bin\Debug\netcoreapp2.0\publish>dir /B  
dotnetDummy.deps.json
dotnetDummy.dll
dotnetDummy.pdb
dotnetDummy.PrecompiledViews.dll
dotnetDummy.PrecompiledViews.pdb
dotnetDummy.runtimeconfig.json
web.config   <-- output of dotnet publish

if you don't see web.config under wwwroot, I would guess there's a mistake during the move

Sign up to request clarification or add additional context in comments.

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.