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.