locked
Blazor (Server Side) project displays blank page when launched but no console errors -- RRS feed

  • Question

  • User-215451226 posted

    Problem is just as it is written above. .netcore blazor project is created on target framework 3.1. am using VS2019 version 16.5.4.

    upon launching, getting a blank page. searched google and it seems to be a common problem. 
    Followed instructions given on the mentioned link on github, tried out both the options.
    this link --> https://github.com/dotnet/aspnetcore/issues/15624

    * delete global.json
    * installing v2.1.304 (already have versions 2.0 upto 3.1 installed on device)

    So tried running it with lower version like 2.1, 2.2 etc.
    Neither works. Getting the same blank page. 
    Visiting network tab from console tools - it's empty, there's nothing there. no console errors.


    what's issue here. what other sdk versions are required to be installed? any specific runtime needed to be installed? what's the exact correct process for .netcore blazor. if more info_ needed reg. environment I'm working on and sdks involved, do ask for it. Will provide.

    Wednesday, January 20, 2021 7:20 PM

All replies

  • User475983607 posted

    This is not a common issue and it is difficult to provide meaningful assistance without the source code or code that reproduces this issue.  Typically, a blank page in any web application is due to a coding error.  Most likely configuration.  You need to perform basic troubleshooting. 

    Open the browser's dev tools.  Look for errors in the console and network view.  Open the event view on the system and look for errors.  If you are running the application in IIS Express open the Output window in Visual Studio and look for errors written to the command console (not browser tools).

    I prefer to host Core applications in the console.  In Visual Studio, next to the run button, change the "IIS Express " selection to the name of your application.  Then run the application and look for error in the console window when the application starts.  You can do the same using the command line from the application root.

    dotnet run

    Wednesday, January 20, 2021 8:12 PM
  • User-215451226 posted

    mgebhard

    This is not a common issue and it is difficult to provide meaningful assistance without the source code or code that reproduces this issue.  Typically, a blank page in any web application is due to a coding error.  Most likely configuration.  You need to perform basic troubleshooting. 

    Open the browser's dev tools.  Look for errors in the console and network view.  Open the event view on the system and look for errors.  If you are running the application in IIS Express open the Output window in Visual Studio and look for errors written to the command console (not browser tools).

    I prefer to host Core applications in the console.  In Visual Studio, next to the run button, change the "IIS Express " selection to the name of your application.  Then run the application and look for error in the console window when the application starts.  You can do the same using the command line from the application root.

    dotnet run

    At the mo. no code. Just creating new project from blazor server side template and launching without writing any addl code in any of the files that's it. so nothing to replicate atmo.

    Will try out the pointers provided in 2nd stanza of your reply. Will see if any discrepancy/source of error found there.

    Wednesday, January 20, 2021 8:54 PM
  • User-474980206 posted

    I'd update to .net 5 do blazor work. It has so many bug/feature fixes for blazor.

    Wednesday, January 20, 2021 11:34 PM