Haybee
Haybee

Reputation: 95

Blazor host on IIS shows blank page

I created a Blazor Server Project which runs well from Visual Studio, i tried hosting same app on IIS installed Runtime and Hosting Bundle to achieve this. Also, i created site and pointed to the published files. When i run the app on the browser, it shows me a blank page without any error.

Please what could i be doing wrong?

Upvotes: 3

Views: 2516

Answers (3)

Gnyasha
Gnyasha

Reputation: 694

It's been a long time but I had to enable static content on Windows Features. Check if you have this Static Content enabled.

Also make sure you have installed the URL Rewrite for IIS on you computer from Microsoft

enter image description here

Upvotes: 0

Detrua
Detrua

Reputation: 59

I had this issue today... I accidentally deleted an import in _Host.cshtml. Unfortunately, this import was used in a string, so no error could be generated. After fixing this all worked fine again.

Upvotes: 0

Simon Curtis
Simon Curtis

Reputation: 457

IIS requires a web.config that isn't created with a normal debug/release build, which is why you are just getting a white screen.

You can use this walkthrough to learn how to publish the website for IIS publish a blazor server application to iis

Alternatively, you could build your own web.config - but I wouldn't recommend it.

Upvotes: -1

Related Questions