the typical issue with running under IIS is the service account, permissions and runtime environment (running as a service).
when run in VS as either an app or its express the appp is running under your account with your permissions. another difference, is that the app is running under logged in windows account, so has access to the windows gui (say MessageBox), and the users profile is loaded into the registry (printer list, mapped drives, etc).
the other common error is configuration (use of localhost, etc).
note: the GrpcWebSocketBridge.AspNetCore package should only be effected by configuration. also the server hosting IIS must support web sockets:
https://learn.microsoft.com/en-us/iis/get-started/whats-new-in-iis-8/iis-80-websocket-protocol-support