Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Here , I have 1 Area and other are common.

Folder Structure:
-wwwroot
-Areas
-Admin
Controller
Views
Shared
_ViewStart.cshtml =====>1
-Controller
-HomeController
-Shared
ViewStart.cshtml =====>2

ViewStart.cshtml in 2

C#
@{
   Layout="_Layout"
 }


And I am using this layout in index action method of Homecontroller

But when i runs the url in browser I got below error?

localhost is currently unable to handle this request. HTTP ERROR 500


I have no problem in Accessing Controller present in area .But while accessing index of HomeController I got this error. Can someone help me?

What I have tried:

And I am using this layout in index action method of Homecontroller

But when i runs the url in browser I got below error?

localhost is currently unable to handle this request. HTTP ERROR 500


I have no problem in Accessing Controller present in area .But while accessing index of HomeController I got this error. Can someone help me?
Posted
Updated 2-Apr-20 12:02pm
Comments
Richard Deeming 29-Jan-19 15:13pm    
Error 500 means there was an error in your code. You need to debug your code to find out what the error is. Without that information, there's no way for anyone to help you.

Make sure you're using the developer exception page, which will give you a lot more details about the error:
Handle errors in ASP.NET Core | Microsoft Docs[^]

1 solution

kindly check database once. In my condition I got issue in asp boilerplate. VS17 .net sdk version 2.2 . just change in app setting file and add any working database and try to run project again.
 
Share this answer
 
v2
Comments
Dave Kreskowiak 2-Apr-20 19:08pm    
You don't have enough information to make those recommendations. A 500 error just means "the code on the server blew up". There'a an infinite number of possible reasons for it, not just database and not just which version of the .NET Framework is being used.

On top of that, I doubt they are still looking for an answer to this over a year later.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900