-
Notifications
You must be signed in to change notification settings - Fork 25.3k
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
Publishing Blazor to IIS from Visual Studio #21226
Comments
Hello @AndyWDev ... You're almost in the right spot. See the coverage in the Overview ... ... You need to point IIS to the WRT improving this coverage ... Yes! I will. I'm working though all of the Blazor topics in the first half of this year. When I reach this node of topics, I will make improvements. To make sure that I don't lose your comment here, I've noted it on my tracking issue at #19286. |
Hi, I did find the web.config as per your post and IIS was already pointing to this directory. I also set the app-pool to not use managed code. I was still getting the error. Next, I installed the IIS core (2.2 I think) for IIS, and then re-installed the .Net 5 SDK again in case my one too old. I can now run the app in IIS, although for some reason my default page does not load (I get MainLayout and the Nav showing, but not my default content page - it does work when F5 debugging using IIS Express). These are the things I meant by additional configuration. I know they are mentioned in different places already, just not in one single place. :) |
You did the right thing with a re-install of the hosting bundle and restart of IIS. You may have had an old ASP.NET Core Module that doesn't work well with the latest release. WRT the default page not loading, I don't know why that would happen. I've never had that happen here. You can ask for help on the usual support channels. We recommend ... If you still can't figure out the problem, you can open a bug report with the product unit. It's best in this case to put up a repro project on GH and show them screenshots of your folder setup and IIS basic+binding configuration with a screenshot of the I'll work on the topics in this node when I reach them on the tracking issue. I'll review your remarks at that time. |
... one more note on ...
Yes, Blazor docs will not go that far. You will need to access the IIS docs for general config. I think you know already where they are, but here's the link to that section of docs if you didn't see them ... https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-5.0 What's in the Blazor docs Host and deploy node cover the concepts that apply specifically to Blazor. |
Update: the not loading the default page was due to the application pool identity account not being set causing the DB connection to fail. There isn't a bug as such - there isn't enough [up-to-date] information documented (in one place) such that one can publish a Blazor app to IIS. The issues that I encountered are symptomatic of this. |
I understand, but I don't think we'll be going that way with the reference coverage. We don't want to duplicate the ASP.NET Core Host and deploy coverage in the Blazor topics. However, a tutorial for this scenario is worth considering. We have one for a garden variety ASP.NET Core app at ... ... so I'll consider creating one like that for Blazor WASM or possibly make that tutorial cover Blazor apps. There's very little difference for Blazor apps. Once IIS is pointed to the right folder/ |
When publishing a Blazor Server App (VS16.8.3/Net 5/EF Core) using a Visual Studio publishing profile and publishing to a local file directory, the web site fails to run giving a 500.19 internal server error (in this case, it appears to be looking for a web.config file which does not exist).
The documentation on this page is very lite with regards to publishing to IIS and I expect there is additional IIS configuration that is required to set up that environment - it would be great if this information could be documented as information found so far elsewhere appears to be out of date.
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: