/Repro-AreaIssue

Sample project created to reproduce a bug.

Primary LanguageC#

This is a sample Orchard Core web project specifically created to reproduce a bug related to Areas.

How to use

  1. Install necessary SDKs for ASP.NET Core development (i.e. dotnet SDK).
  2. Restore NuGet packages, build and run AreaIssue.Web project.
  3. The opened page is the Orchard Core setup page. Fill with dummy data (no emails sent). Recipe can be left as is.
  4. Log in with the created super user.
  5. Go to ~/Admin > Configuration > Features and enable AreaIssue.Module feature. This will register the module's area.
  6. Now the ~/AreaIssue.Module/Test/Index URL opens the page test page which is generated by the TestController/Index action in the AreaIssue.Module class library.

Reproduce the "Cannot resolve area" issue

  1. Open the AreaIssue.Web/Controllers/ReproController.cs file.
  2. You can see that the RedirectToAction("Index", "Test", new { Area = "AreaIssue.Module" }); triggers this error, however, this redirect will work runtime (use the ~/AreaIssue.Web/Repro/Index URL).