Publish .net 5 web assembly site to IIS fails

image

Also inside the radzen application ( i just updated the app today, so it is current) when i deploy...
it has link that states...

when you click the following link it takes you to .net core 3.1, versus .net 5...is that the intended functionality here? I have installed .net 5 hosting, and still i get the error attempting to deploy to site.

I have deployed from vs 2019 a custom non radzen web assembly .net 5 core app to this same site without issue.

what am i doing wrong?

The link was wrong, thanks - not sure however about the error. Check the log file in the deployed app root folder. I've just deployed new .NET 5.0 app to my IIS and everything worked normally:

i created sample app for blazor server .net 3.1 deployed to site...works.
i created sample app for blazor web assembly .net 3.1 deployed to site...works.

i created sample app for blazor server .net 5 deployed to site...works.
i created sample app for blazor web assembly .net 5.0 deployed...get error i sent above...?

If i can run a .net 5 blazor server site, why would the web assembly not work?

sidenote: there is an error when deploying 3.1 assembly but still succeeds, but gets some type of missing analyzer dll error during deploy

Have you checked the log file?

is this what you are referring to?
here is the log inside the radzen app...

dotnet: Microsoft (R) Build Engine version 16.8.0+126527ff1 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

dotnet: Determining projects to restore...

dotnet: All projects are up-to-date for restore.

dotnet: Radzen4.Client -> C:\Users\cglick\source\Radzen\RADZEN4\client\bin\Release\net5.0\Radzen4.Client.dll

dotnet: Radzen4.Client (Blazor output) -> C:\Users\cglick\source\Radzen\RADZEN4\client\bin\Release\net5.0\wwwroot

dotnet: Radzen4.Server -> C:\Users\cglick\source\Radzen\RADZEN4\server\bin\Release\net5.0\Radzen4.Server.dll

dotnet: Radzen4.Server -> C:\Users\cglick\source\Radzen\RADZEN4\server\bin\Release\net5.0\Radzen4.Server.Views.dll

dotnet: Optimizing assemblies for size, which may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink

radzen: Server application prepare for publish done in 45345ms.
radzen: Deploying...
radzen: Reading connection strings
radzen: Saving connection strings in appsettings.json
radzen: Creating temporary deploy folder
radzen: Copying server app to deploy folder
radzen: Syncing deploy folder with server
dotnet: Compressing Blazor WebAssembly publish artifacts. This may take a while...

msdeploy: Total changes: 2 (0 added, 0 deleted, 2 updated, 0 parameters changed, 621 bytes copied)

radzen: Removing temporary deploy folder
radzen: Deploy done in 3010ms.
radzen: Stopped server.

event 1 - Unable to locate application dependencies. Ensure that the versions of Microsoft.NetCore.App and Microsoft.AspNetCore.App targeted by the application are installed.
event 2 - Could not find 'aspnetcorev2_inprocess.dll'. Exception message:
event 3 - Failed to start application '/LM/W3SVC/4/ROOT', ErrorCode '0x8000ffff'.

these are events when i try to run site from iis, keep in mind i can run the site from radzen without issue.

why don't you create a new .net 5 blazor web assembly app, create a blank page and publish it to iis, you will see same error?

I was able to reproduce the problem - fix will be included in the next update. In the meantime you can use Visual Studio to publish/deploy your .NET 5.0 WASM app.

1 Like

Thank you for your support as always!

Has this issue been resolved?

Yes, now Radzen will copy all needed files to IIS unlike the previous version where no files were copied in case of .NET 5.