Hey,
Getting started with the ASP.NET Core tutorial.
<a class="postlink" href="https://aspnetzero.com/Documents/Developing-Step-By-Step-Core#adding-a-new-page">https://aspnetzero.com/Documents/Develo ... a-new-page</a>
I have been trying to add a new page, but it fails. I have triple checked that the Controller and Action name match the URL I'm trying to access, which is /Venue/Accounts.
What's weirder is I can put ANY GIBBERISH into the URL bar and I still get a blank page. Like, if I put, /Venue/fdajfkdl;sajflk;dsajfsda or /Venue/poop I get a blank page. Normally, I would expect there to be an error page for unmapped routes.
1 Answer(s)
-
0
Hi,
The reason you are seeing an empty page is, we are using ASP.NET's app.UseDeveloperExceptionPage(); for development time. And I just realized that it does show an empty page for 404 error.
There are two reasons your controller does not work.
- You should add [Area("Venue")] attribute to your controller in order to see it under Venue area url.
- You need to register your Controller to dependency injection. You can derive it from either ITransientDependency or better "[YourProjectName]ControllerBase" class.