[WA] No Server with .NET 5 Deployment

Hello everyone, I'm testing the 15 days trial with the Radzen-Tool before I buy, the tool looks awesome so far (did watch ALL of the videos). But if I try to deploy an application with .NET 5, the ZIP-File does not contain any server files, even if the console says "Copying server app to deploy folder" without any errors. The ZIP file does have the same files as the "\server\bin\Release\net5.0\publish" folder, which are:

  • publish (empty folder)
  • ref\RadzenBlazerWa3.Client.dll
  • wwwroot_framework*.* (all the files)
  • appsettings.json
  • RadzenBlazerWa3.Client.*
  • web.config

In the folder "\server\bin\Release\net5.0" there are the server files (like "RadzenBlazerWa3.Server.exe"), if I try to start the server, everything looks fine (in the console), but if I try to access the web page, it redirects me to the SSL Port (5001) und there I get a 404 error. I can't reproduce the other error, but I got something like "digest" and "sha256" error.

The dev run worked fine so far and with .NET Core I can create the correct deployment. In all cases I used the default settings and used the same database (the example database from the CRM Tutorial), so nothing special at all.

Hi @RickJ,

Not sure why there are no server related files in your zip - usually looks like this:

All my other builds looks exactly the same. But this looks like so:
image

This is what I did so far:

  • Updated VS 2019 to the latest version
  • Installed the latest Radzen
  • Installed the .NET files via the Radzen Tool
  • Tested a .NET 5 WA Project within VS 2019 (everything ok)
  • Created different projects (everything ok)
  • Created projects with .NET 5 WA, no server files

Seems this also happens with my .NET 5 WA projects without any datasources, just an empty index page.
What can I do?

If I deploy it via Visual Studio, the server files will be generated, but when I open the website I will be forwarded to the SSL Port (5001) and get this error:
Failed to find a valid digest in the 'integrity' attribute for resource 'https://localhost:5001/_framework/dotnet.wasm' with computed SHA-256 integrity '47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='. The resource has been blocked.

I need to test the basics before becoming a costumer.

All errors:
localhost/:1 Failed to find a valid digest in the 'integrity' attribute for resource 'https://localhost:5001/_framework/dotnet.wasm' with computed SHA-256 integrity '47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='. The resource has been blocked.

localhost/:1 Unknown error occurred while trying to verify integrity. blazor.webassembly.js:1 Streaming compilation failed. Falling back to ArrayBuffer instantiation. TypeError: Failed to fetch

blazor.webassembly.js:1 TypeError: Failed to fetch d.printErr @ blazor.webassembly.js:1 (anonymous) @ blazor.webassembly.js:1 (anonymous) @ blazor.webassembly.js:1 (anonymous) @ blazor.webassembly.js:1 s @ blazor.webassembly.js:1 Promise.then (async) u @ blazor.webassembly.js:1 a @ blazor.webassembly.js:1 Promise.then (async) u @ blazor.webassembly.js:1 (anonymous) @ blazor.webassembly.js:1 r @ blazor.webassembly.js:1 d.instantiateWasm @ blazor.webassembly.js:1 createWasm @ dotnet.5.0.2.js:1 (anonymous) @ dotnet.5.0.2.js:1

blazor.webassembly.js:1 Uncaught (in promise) TypeError: Failed to fetch Promise.then (async) u @ blazor.webassembly.js:1 a @ blazor.webassembly.js:1 Promise.then (async) u @ blazor.webassembly.js:1 (anonymous) @ blazor.webassembly.js:1 r @ blazor.webassembly.js:1 d.instantiateWasm @ blazor.webassembly.js:1 createWasm @ dotnet.5.0.2.js:1 (anonymous) @ dotnet.5.0.2.js:1

If I disable the integrity check, I get these errors:
Streaming compilation failed. Falling back to ArrayBuffer instantiation. CompileError: WebAssembly.instantiateStreaming(): unexpected end of stream @+4294967295

TypeError: Failed to execute 'arrayBuffer' on 'Response': body stream already read at blazor.webassembly.js:1 d.printErr @ blazor.webassembly.js:1 (anonymous) @ blazor.webassembly.js:1 (anonymous) @ blazor.webassembly.js:1 (anonymous) @ blazor.webassembly.js:1 s @ blazor.webassembly.js:1 Promise.then (async) u @ blazor.webassembly.js:1 a @ blazor.webassembly.js:1 Promise.then (async) u @ blazor.webassembly.js:1 (anonymous) @ blazor.webassembly.js:1 r @ blazor.webassembly.js:1 d.instantiateWasm @ blazor.webassembly.js:1 createWasm @ dotnet.5.0.2.js:1 (anonymous) @ dotnet.5.0.2.js:1

blazor.webassembly.js:1 Uncaught (in promise) TypeError: Failed to execute 'arrayBuffer' on 'Response': body stream already read at blazor.webassembly.js:1 (anonymous) @ blazor.webassembly.js:1 Promise.then (async) u @ blazor.webassembly.js:1 a @ blazor.webassembly.js:1 Promise.then (async) u @ blazor.webassembly.js:1 (anonymous) @ blazor.webassembly.js:1 r @ blazor.webassembly.js:1 d.instantiateWasm @ blazor.webassembly.js:1 createWasm @ dotnet.5.0.2.js:1 (anonymous) @ dotnet.5.0.2.js:1

I have no more ideas atm...

Have you upgraded your app manually (updated the project references) from .NET 3.1 to .NET 5?

No, I created a brand new Blazor WebAssembly Project (in Radzen) with .NET 5 selected, just added an empty page (with a title). Before that I created Angular, Blazor ServerSide and Blazor WA project with .NET Core and .NET 5 (all at the same time), deployed all and just the Blazor WA with .NET 5 have these problems. A new Blazor WA with .NET 5 in VisualStudio also worked fine. I mean the missing files are just a part of the problem, I could live with deploying via VS, if that worked.

It seems like it has something to do with the generated project files and the cache (which means the cache can maybe hold the "good" files from a working project).
After a few reboots I did get it to work again, so to reproduce I invested days now, this is how I can reproduce it:

  • Create a new Blazor WA (with .NET 5) project
  • Add (empty) Index page
  • Run the app
  • Deploy it to a folder (via Radzen)
  • => The server files are missing
  • Now I publish via VS
  • The server files are there, but when I run the app,I get the integrity error
    Failed to find a valid digest in the 'integrity' attribute for resource 'https://localhost:5001/_framework/dotnet.wasm' with computed SHA-256 integrity '47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='. The resource has been blocked.
  • Close Radzen

Now the error:

  • Create a new Blazor WA (with .NET 5) project
  • Add (empty) Index page
  • Run the app
  • Deploy it to a folder
  • Server files are missing like before
  • Now deploy it via VS
  • Open the deployed App
  • Go to the Dev-Tools with F12 (Chrome for example) Clear site data (F12 -> Application) and then hard refresh the site
  • Now the integrity error comes in the console (or maybe right after start)
    Failed to find a valid digest in the 'integrity' attribute for resource 'https://localhost:5001/_framework/dotnet.wasm' with computed SHA-256 integrity '47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='. The resource has been blocked.
  • Whatever I do (including multiple reboots, new projects, new deployments), I always get the error

The only way how it works for me is this:

  • Create a new Blazor WA (with .NET 5) project
  • Add (empty) Index page
  • Deploy it via VS

I use VS 2019, if I look at the generated solution files, there is maybe one of the errors.

BlazorErrorTest10: The generated (note the version, the project name and the paths - it was named to "BlazorErrorTest10", not "project"):

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "project", ".\server\BlazorErrorTest10.Server.csproj", "{08CB1B0D-7193-4277-9BA6-00F60A6733DF}"
EndProject
Project("{5DEB2F3D-1FE5-4823-AD54-5BBB1FF43341}") = "project", ".\client\BlazorErrorTest10.Client.csproj", "{5DEB2F3D-1FE5-4823-AD54-5BBB1FF43341}"
EndProject
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "meta", ".\meta", "{5270BF30-4F7A-46D8-8E30-0DC996011F85}"
ProjectSection(WebsiteProperties) = preProject
TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
Debug.AspNetCompiler.VirtualPath = "/localhost_63785"
Debug.AspNetCompiler.PhysicalPath = "..\meta"
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_63785"
Debug.AspNetCompiler.Updateable = "true"
Debug.AspNetCompiler.ForceOverwrite = "true"
Debug.AspNetCompiler.FixedNames = "false"
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.VirtualPath = "/localhost_63785"
Release.AspNetCompiler.PhysicalPath = "..\meta"
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_63785"
Release.AspNetCompiler.Updateable = "true"
Release.AspNetCompiler.ForceOverwrite = "true"
Release.AspNetCompiler.FixedNames = "false"
Release.AspNetCompiler.Debug = "False"
VWDPort = "63785"
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{08CB1B0D-7193-4277-9BA6-00F60A6733DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{08CB1B0D-7193-4277-9BA6-00F60A6733DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{08CB1B0D-7193-4277-9BA6-00F60A6733DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{08CB1B0D-7193-4277-9BA6-00F60A6733DF}.Release|Any CPU.Build.0 = Release|Any CPU
{8D393424-8170-40D4-A6F2-812A06241AB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8D393424-8170-40D4-A6F2-812A06241AB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8D393424-8170-40D4-A6F2-812A06241AB0}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{8D393424-8170-40D4-A6F2-812A06241AB0}.Release|Any CPU.Build.0 = Debug|Any CPU
{5270BF30-4F7A-46D8-8E30-0DC996011F85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5270BF30-4F7A-46D8-8E30-0DC996011F85}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5270BF30-4F7A-46D8-8E30-0DC996011F85}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{5270BF30-4F7A-46D8-8E30-0DC996011F85}.Release|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B4DD93E6-001E-4807-98D0-AB4FF27F240D}
EndGlobalSection
EndGlobal

BlazorErrorTest11: The "fixed" (open and saved by VS):

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30907.101
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorErrorTest11.Server", "server\BlazorErrorTest11.Server.csproj", "{08CB1B0D-7193-4277-9BA6-00F60A6733DF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorErrorTest11.Client", "client\BlazorErrorTest11.Client.csproj", "{5DEB2F3D-1FE5-4823-AD54-5BBB1FF43341}"
EndProject
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "meta", "meta", "{5270BF30-4F7A-46D8-8E30-0DC996011F85}"
ProjectSection(WebsiteProperties) = preProject
TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
Debug.AspNetCompiler.VirtualPath = "/localhost_63785"
Debug.AspNetCompiler.PhysicalPath = "..\meta"
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_63785"
Debug.AspNetCompiler.Updateable = "true"
Debug.AspNetCompiler.ForceOverwrite = "true"
Debug.AspNetCompiler.FixedNames = "false"
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.VirtualPath = "/localhost_63785"
Release.AspNetCompiler.PhysicalPath = "..\meta"
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_63785"
Release.AspNetCompiler.Updateable = "true"
Release.AspNetCompiler.ForceOverwrite = "true"
Release.AspNetCompiler.FixedNames = "false"
Release.AspNetCompiler.Debug = "False"
VWDPort = "63785"
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{08CB1B0D-7193-4277-9BA6-00F60A6733DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{08CB1B0D-7193-4277-9BA6-00F60A6733DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{08CB1B0D-7193-4277-9BA6-00F60A6733DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{08CB1B0D-7193-4277-9BA6-00F60A6733DF}.Release|Any CPU.Build.0 = Release|Any CPU
{5DEB2F3D-1FE5-4823-AD54-5BBB1FF43341}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5DEB2F3D-1FE5-4823-AD54-5BBB1FF43341}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5DEB2F3D-1FE5-4823-AD54-5BBB1FF43341}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5DEB2F3D-1FE5-4823-AD54-5BBB1FF43341}.Release|Any CPU.Build.0 = Release|Any CPU
{5270BF30-4F7A-46D8-8E30-0DC996011F85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5270BF30-4F7A-46D8-8E30-0DC996011F85}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5270BF30-4F7A-46D8-8E30-0DC996011F85}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{5270BF30-4F7A-46D8-8E30-0DC996011F85}.Release|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B4DD93E6-001E-4807-98D0-AB4FF27F240D}
EndGlobalSection
EndGlobal

There is also a other problem, after a few deploy tests, I can't set the user and password in the IIS Deploy settings anymore, but I don't want to waste more time for this, I will try it via VS for now.

Based on the files you are showing it looks like you are deploying/publishing the Client app. You need the server app and would publish that. If you are using the "Blazor Wasm with ASPNET Hosted" then you'd publish the server (aspnet) app. THe client app would come with it as it is referenced.

I'm using the Radzen Deploy function, you can't choose client/server there. Via VisualStudio I always deploy via the server project.