Closed sam-wheat closed 2 years ago
@sam-wheat thanks for contacting us.
It seems from what I can tell that your server is not sending the right content back to the client. I would suggest you open the network tab and load the page to see the responses the server is sending for the blazor assets. In your specific case, it usually means that blazor.boot.json is not being sent by the server and some other content is being provided instead. I would start by checking that first.
Hi @sam-wheat. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
Thank you @javiercn.
blazor.boot.json is not sent but it is not requested either. blazor.webassembly.js is requested and sent.
@sam-wheat check the files in your network tab until you find one whose contents don't match Uncaught SyntaxError: Unexpected token '<'
usually means you are expecting JS or JSON and are receiving HTML.
Hi @sam-wheat. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
The requested file is blazor.webassebmly.js but the content of the file is that of index.html.
@sam-wheat this looks like a configuration issue on your server. We recommend posting your question to StackOverflow for a faster response.
I am deploying to Azure. I am asking how to configure the deployment pipeline.
Is there a link to a document that provides an example .csproj and yml pipleline for deploying a Blazor app to an Azure web service?
Does this documentation exist? I think it is fair to request this.
Thanks
Same issue as here: https://github.com/dotnet/aspnetcore/issues/36641
https://docs.microsoft.com/en-us/azure/static-web-apps/deploy-blazor
https://blazorhelpwebsite.com/ViewBlogPost/10
https://docs.microsoft.com/en-us/dotnet/core/tools/sdk-errors/netsdk1045
https://docs.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-6.0
https://docs.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-6.0#standalone-deployment
With regard to the last link above, how is it possible to install the URL Rewrite module to Azure?
Is there a link to a document that provides an example .csproj and yml pipleline for deploying a Blazor app to an Azure web service? Please provide the url as I am unable to find any such documentation. Note I am deploying to a Virtual Application of an Azure App Service.
Pipeline:
.csproj
dotnet:
Edit:
I added the following to the pipeline:
Removed the following from .csproj
Project builds and deploys however errors on page load: