1 year ago

#234068

test-img

Kempeth

What is still missing in my attempt to host a blazor-server app?

I've been hitting my head against this wall for days now and to my knowledge I've followed every direction I've found. But I'm still getting a 500 Error when I browse to the URL.

What I've got to work with is a Windows Server 2012 R2 with IIS 8.5. I'm not married to IIS but I'd prefer not to dip into YET another tech just to get this running.

What I've done:

  • Old-style blazor-server app (with Program / Startup pair) without authentication. Dependencies:
    • SharpZipLib
    • LiteDB
  • published it using dotnet publish -o bin/publish --self-contained -r win7-x64
  • copied that folder to the server
  • On the server:
    • installed urlrewrite2
    • installed everything under Windows Features Word Wide Web Services and Web Management Tools
    • restarted
  • created a new site in IIS
    • set the application pool to unmanaged
    • set the physical path to the folder I copied from my dev system

What I haven't done:

Anything regarding Visual Studio as I'm currently forced to contend with Visual Studio Code and none of that applies/is possible here.

Provisional Workaround

  • running dotnet my.dll --urls http://*:1234 does work to expose the app to the network
  • the command needed to be run inside the application folder otherwise the app would fail to load the connection string.
  • I've also had to provision a production database and modify my appsettings.json accordingly

This is workable for now but not having the app "auto start" with the server is unsatisfactory.

blazor-server-side

iis-8

0 Answers

Your Answer

Accepted video resources