Publish to azure

Hi,
i have an error when i try to publish a sample app to an azure web app when i follow your documentation deployment instructions.

On step 3 " If the URL of the application is https://my-blazor-app.azurewebsites.net enter my-blazor-app.". My URL looks like "myblazorapp.westeurope-01.azurewebsites.net", so i have to use "myblazorapp.westeurope-01", right?

The output error is:
"C:\radzen\BlazorWasmSqlazure\Server\obj\Release\net8.0\PubTmp\BlazorWasmSqlazure.Server-20250216003201626.zip" wird in "https://myblazorapp.westeurope-01.scm.azurewebsites.net/api/zipdeploy" veröffentlicht...
C:\Program Files\dotnet\sdk\9.0.200\Sdks\Microsoft.NET.Sdk.Publish\targets\PublishTargets\Microsoft.NET.Sdk.Publish.ZipDeploy.targets(58,5): error MSB4018: Unerwarteter Fehler bei der ZipDeploy-Aufgabe. [C:\radzen\BlazorWasmSqlazure\Server\BlazorWasmSqlazure.Server.csproj]"

For me it looks like the used URL "https://myblazorapp.westeurope-01.scm.azurewebsites.net/api/zipdeploy" is not correct. It should be "https://myblazorapp.scm.westeurope-01.azurewebsites.net/api/zipdeploy" ? Or is the another problem?

Thanks!

Hi @Peanut,

Does this procedure work for you? Radzen Blazor Studio uses a very similar publish profile to do the deployment.

Hi @korchev ,
i use Blazor Webassembly. Do i need to publish server and client project?
Thanks!

I think just the server project. It references the client and should build it as part of the publish process.

Hi @korchev ,
the linked procedure with VS2022 and server project works. The message is "Web App was published successfully https://myblazorapp.westeurope-01.azurewebsites.net/".
VS seems to take the correct url. Do you know whats wrong?

Thanks!

I am not really sure but you can compare the pubxml with the one created by Radzen Blazor Studio.

Hi @korchev ,
what information do you need to analyse the problem? Or is it possible to share to files with you?

You can just compare the two pubxml files (the one that works and one that doesn't).

Hi @korchev,
following the urls:

VS pubxml:
<MSDeployServiceURL>myblazorapp.scm.westeurope-01.azurewebsites.net:443</MSDeployServiceURL>

RBS pubxml file:
<PublishUrl>https://myblazorapp.westeurope-01.scm.azurewebsites.net/</PublishUrl>

I just created and deployed a brand new app to Azure without any issues: https://rbsserver1-windows.azurewebsites.net/

Here is the pubxml without the user and password:

<Project>
    <PropertyGroup>
        <WebPublishMethod>ZipDeploy</WebPublishMethod>
        <PublishProvider>AzureWebSite</PublishProvider>
        <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
        <LastUsedPlatform>Any CPU</LastUsedPlatform>
        <SiteUrlToLaunchAfterPublish>https://rbsserver1-windows.azurewebsites.net</SiteUrlToLaunchAfterPublish>
        <LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
        <PublishUrl>https://rbsserver1-windows.scm.azurewebsites.net/</PublishUrl>
        <_Application>rbsserver1-windows</_Application>
    </PropertyGroup>
</Project>

And here is the log from Radzen Blazor Studio:

Can you try updating the <PublishUrl> in your RBS pubxml file to https://myblazorapp.scm.westeurope-01.azurewebsites.net and see if deployment succeeds?

Yes, with the updated url the deployment works!

It seems this is a relatively new Azure feature enabled via this option:

azure

We will try to support it with the next RBS release.

1 Like