-
Notifications
You must be signed in to change notification settings - Fork 55
Issues with 404 errors when starting the *.Blazor.Server project #193
Comments
@vortex852456 The fact that you have a connection error with Websocket is normal through a regular web browser if you don't have your remote native apps active (and your current server project configured properly). However i don't understand why you don't have the CSS loading properly. Your test project you commited for me work on my computer. Did you have any special output on Visual Studio build console ? |
Also what is your working path ? |
I reproduced you issue, but only when i remove the app.UseStaticFiles(); from Configure in your Startup.cs file in TestApp.Blazor.Server . Is your .NET Core installation up to date ? https://dotnet.microsoft.com/download/dotnet-core/3.1 When using app.UseStaticFiles everything work right for me. |
This is my build output:
This is my working path: C:\Dev\GitHub\vortex852456\TestApp
I installed the latest SDK (3.1.201) and Runtime (ASP.NET Core Runtime 3.1.3) from your link and Visual Studio 2019 (16.6.0 preview 2.0). Did you open the url http://localhost:5080/?mode=server or is there another one to open? |
The url for the request css static file is http://localhost:5080/css/site.css - is this correct? |
I will try to clone and run the TestApp on another machine - reporting back in a few minutes. |
This is my console output when setting TestApp.Blazor.Server as statup project and asking to compile this project:
|
Yes |
You don't have to write mode=server anymore it was a thing a long time ago.
|
This comment has been minimized.
This comment has been minimized.
Nevermind, BlazorMobile.Build is called when I rebuild:
|
Still have this error on the other computer ? The weird thing is that blazor.server.js is loading properly on your project ! Are you debugging with IIS or IIS Express ? |
The behaviour on the other computer is the same :-/ Neither. I'm debugging by pressing F5 which is configured in the project template:
How do you start the debugging? |
I will try to update to the latest Preview of Visual Studio. On the top, you have an arrow for the debug profil to use. Instead of the Project one, use IIS Express, and tell me if you see any difference ? I'm updating VS to test actually with your profile. |
Btw, thanks for your help so far :) |
I have this option on my computer, i don't know if it's related to the fact that i checked the Use IIS during development option in Visual Studio installation. I will try to test with the same profile when my installation is finished (downloading...) |
Got it running - with IIS Express the static files are loading (see https://github.com/vortex852456/BlazorMobile---TestApp/commit/40e32538ce19991196ae7cd03dbc6a30f4d08176) |
Actually i didn't have to even set UseIISIntegration in Program.cs, just selected the profile. Maybe something is not up to date on the template if working without IIS Express ? I should compare with a fresh new Blazor app. |
But it's a good news, you can now debug ! Maybe something in the configuration is wrong or not working anymore by default. I will compare with current regular template for Blazor in the future. I will keep this issue open in order to check for the next release, and if people has the same issue, it will be visible. Thanks for the report by the way ! |
I don't have reproduced your bug by testing templates. I added some example code (commented) for the next version in templates in order to make theses options more clear (if needed) if this issue occur and a workaround is needed. |
I want to start the *.Blazor.Server to be able to Debug things in my Blazor App. But I'm getting 404-errors on static files.
Steps to reproduce:
dotnet new -i BlazorMobile.Templates::3.2.4-preview2.20160.5
dotnet new blazormobile -n TestApp
open TestApp.sln
set TestApp.Blazor.Server as startup project
F5 (start debug)
confirm dialog asking for ssl trust
manually open http://127.0.0.1:5080
I pushed the source to https://github.com/vortex852456/BlazorMobile---TestApp
Originally posted by @vortex852456 in #182 (comment)
The text was updated successfully, but these errors were encountered: