AspNetCore.Docs icon indicating copy to clipboard operation
AspNetCore.Docs copied to clipboard

/Movies not working

Open mearistizabal opened this issue 8 years ago • 3 comments

Hi. The app seems to start good. I can load http://localhost:61298 but not /movies. The page goes empty. In the application Insights there is a 404 error for the page as if the page wasn't build. Any idea?. Thank you.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

mearistizabal avatar May 15 '18 01:05 mearistizabal

That can fail for countless reasons. Download the completed app and run it. Compare your app to the completed. Step through the debugger in each app to help you figure out what's wrong/missing/etc. I can tell you the app works. Let us know when you figure out what you did wrong.

Rick-Anderson avatar May 15 '18 02:05 Rick-Anderson

If it's blank, it means your scaffolding step did not work. You might as well be putting http://localhost:61298/blahblahnonsense. You'll get the same result.

My advice:

  1. take a break
  2. open powershell
  3. make SURE you are in the same directory as your Program.cs file
  4. MAKE SURE you are running the project you think you are running. Sometimes when flying through these samples it gets shockingly easy to lose which project:tutorial you are on

The samples do work, I just verified it myself 5 minutes ago. Keep trying and as Rick says, start debugging. That's where you learn the most anyway.

iamcraigw avatar May 22 '18 21:05 iamcraigw

i have found the solution while scaffolding the project, the scaffolding was unable to find the Movies folder. Change it to below. Use backslash instead of forward slash. Before excuting the below command, you may want to create a Movies folder first inside your Pages folder. I am using VS code.

dotnet aspnet-codegenerator razorpage -m Movie -dc RazorPagesMovieContext -udl -outDir Pages/Movies --referenceScriptLibraries

jasonwongys avatar Sep 19 '19 03:09 jasonwongys