-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
service worker is not being registered and rendered when .NET core 5 app is published into IIS #83
Comments
Can you confirm that there is no error logged in your console, also if you are using https |
I have the same issue in .net core 3.1 |
Can you run your code in release mode and check if it is still registered |
I just ran into the same issue with .NET core 3.1. Everything looked good when running locally, but then the service worker wasn't being registered after deploying to our K8S clusters. In the 'ServiceWorkerTagHelperComponent' class (lines 38-41), I see the issue
On my local, this evaluates to 'true', so the service worker script was being added to the page. However, in our K8S clusters, this evaluates to 'false', so the service worker script was not being added |
David: Same issue here. The IIS server is placed behind a BigIP firewall, and https is being offloaded to http, making the script tag not being rendered. Did you find any solution? |
The solution would be to set AllowHttp property of the PwaOptions to true:
Locally you most likely run your application as "Development" environment, which would make the if to evaluate to true. |
Proposal to close this one. |
Hi, the service worker is not being registered and rendered when .NET core 5 app is published into IIS.
While running the app via visual studio on IIS Express it does works but on IIS it's not.
What could be the reason?
The text was updated successfully, but these errors were encountered: