Base solution for your next web application
Open Closed

Blank pages? #1893


User avatar
0
commondesk created

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.

Any ideas what might be going on here?


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    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.

    1. You should add [Area("Venue")] attribute to your controller in order to see it under Venue area url.
    2. You need to register your Controller to dependency injection. You can derive it from either ITransientDependency or better "[YourProjectName]ControllerBase" class.