-
Notifications
You must be signed in to change notification settings - Fork 25.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CAN'T DEPLOY BLAZOR WASM ON AZURE #22753
Comments
What do the logs show? What's the error message? Can you test a Razor Pages or MVC app? |
Hi sorry, I'm new to azure hosting, so I'm still unsure on where to check for app logs. I just created a free azure account and decided to host two applications I had been working to test Azure out. The Razor-Pages project deployed without a hitch, but the blazor wasm project - not so much. So I decided to create a new Blazor wasm project with all the config i mentioned in my post earlier (I didnt change a single line of code) but yet it refused to run. I just get an error 500 on the browser and that's it. It's very easy to recreate the error, you can try it from your end |
It works fine here. Can you review https://docs.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly |
@Coscotex101 ... I don't think that such an app with Identity configuration (if I'm reading your remarks correctly) will work OOB. You'll likely need to check out ...
The PWA with Identity/auth (and with Azure hosting) isn't something that I've had time to work with, so I'm at a loss to help much directly. Your best bet for product support for this scenario is to reach out to community devs who do work regularly with PWAs and Identity/auth ... and they often do use Azure for hosting. If you can't get the IdS config on your own with the guidance that I recommended ☝️, try asking on the support channels that we recommend ... |
Headed into working with Identity, what you might do is deploy a PWA app without Identity first and confirm that such an app loads, runs, and behaves normally (paying attention to whatever guidance Steve placed in the PWA topic for the non-Identity PWA app). Once you have the basic hosting/deployment setup confirmed, then you can engage with the more challenging aspects of Identity and auth setup/config/functioning. It's a 🤠 Texas two-step experience™ 🕺💃 😄. UPDATE: Yes ... I was just reflecting on this further after suggesting that ☝️ ... there might be a PWA-Identity thing going on here for when either (a) the app is a PWA and Identity is checked ... i.e., the template itself isn't getting all of the right config in the right spots, and/or (b) we know that flavors of Visual Studio were not setting up hosted WASM configuration correctly ... we even have a NOTE in our WASM coverage telling devs that they can't publish directly from VS to Azure when VS sets up the project's Identity config because project generation from the template gets broken. The dev has to go thru our WASM security coverage first to confirm that the app has all of the correct config. This problem will go away with a VS release (soon, I hope ... maybe at 6.0 ... not sure ... IIRC, I checked VS recently but don't recall the version and it was still breaking apps 💥). FURTHER UPDATE: Indeed! I made a note to myself to remove that NOTE that I mentioned at VS 17 on #20297. Therefore, @Coscotex101, I recommend that you check the hosted WASM security topic for IdS and see if VS didn't create the Identity config correctly ... adjust it manually as needed per the topic's guidance. If that's what the problem is, then it's already planned for resolution when VS 17 is out AFAIK (or a later flavor of VS 16). I've made a Note to self on my topic overhaul tracking issue to explore this further when I reach the Hosted WASM with Identity Server topic. #19286 |
thanks a lot @guardrex . I'll check out the suggested reads and revert. Although it would really be nice to have this out of the box. Thanks again |
To recreate:
Create a new blazor wasm web app project (asp.net core hosted: ticked; pwa: ticked; individual user account selected) on .net5.0, visual studio version 16.10.3.
Right-click the server project and publish with your free azure profile.
Result: it never starts, and I didnt change a single line of code.
[Enter feedback here]
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: