ASP.NET Core

Fix for published ASP.NET Core app showing blank pages

Have you deployed an ASP.NET Core application to Azure Web Apps (via Visual Studio Publish)… and now you only see blank pages (no HTML generated at all)? Here’s the simple fix

The problem could be that your Views folder is not uploaded because, by default in a blank project, the Views folder is not included in the list of publish options.

To fix it:

  • Open project.json
  • Go to publishOptions and add Views, as seen below
    • If publishOptions isn’t there, add it
  • Re-deploy your project

This was a newbie problem that I encountered… As with any solution, it’s obvious with hindsight!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s