Archive

Posts Tagged ‘.net core’

RADZEN published application or Blazor WASM works only for localhosts

February 8, 2023 Leave a comment

Today I faced another cool issue, I have a Blazor app build via Radzen, the application works fine in VS Studio and Blazor studio.

When I published the application, I placed it on IIS server and it worked great, the issue that I can login only if I open the application from localhost on IIS, if I try using the FQDN or the IP it won’t, same for HTTP and HTTPS as well.

It took me a while to fiddle in the logs then I found:

  Authorization failed. These requirements were not met:
  DenyAnonymousAuthorizationRequirement: Requires an authenticated user

So, what is the issue, after some troubleshooting, I found that I enabled multitenancy in the app, all users where placed in the main tenant for the time being, but the base URL or hosts for the tenant was set to http://localhost:5000

after editing the Hosts in the tenant field to change it to my IP address, the application worked perfect, had to read this:

https://learn.microsoft.com/en-us/ef/core/miscellaneous/multitenancy

Categories: Uncategorized Tags: , ,