Software⏱️ 2 min read📅 2026-05-31

How to Fix: How do I solve a "view not found" exception in asp.net core mvc project

Configure the Startup.cs file to fix the 'view not found' exception in ASP.NET Core MVC.

Quick Answer: Add the view files to the Views folder and configure the Startup.cs file to use the correct view engine.

To resolve the 'view not found' exception in ASP.NET Core MVC, first ensure that the view you are trying to access exists in the correct location. In ASP.NET Core, views are typically located in the `Views` folder within your project.

🔧 Proven Troubleshooting Steps

Method 1: View Location

  1. Step 1: Verify that the view exists in the correct location, i.e., `Views/Home/Index.cshtml` (or any other controller and action you are trying to access).

Method 2: Use View Location Helper

  1. Step 1: In your controller, use the `ViewLocationHelper` to specify the correct view location.

🎯 Final Words

By following these steps, you should be able to resolve the 'view not found' exception in your ASP.NET Core MVC project and access your views successfully.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions