Hi,
I am trying to add a https (port 443) binding in IIS for the Angular site but I get an error saying "An Error Has Occurred"
I have checked the following:
- The backend is running and I am able to see the swagger ui
- The frontend appsettings.json is pointing to the correct port for the backend.
- The CorsOrigins are pointing to the https address
If I switch the Angular site back to http (port 80) I don't get the error.
I have tried to search the forums for similar problems but with no luck.
Can you provide a quick guide to enabling HTTPS for the Angular site?
Best regards Henrik
3 Answer(s)
-
0
I have it working on port 44390 in Azure
<rewrite> <rules> <rule name="Force HTTPS" enabled="true"> <match url="(.*)" ignoreCase="false" /> <conditions> <add input="{HTTPS}" pattern="off" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent" /> </rule> </rules> </rewrite>
Hope this helps
-
0
Hi @henriksorensen,
We don't have a guide for this but we can try to help. When you open angular client with https, can you see if the requests are made to correct host url ? If so, host project's log file should contain detailed message for "An Error Has Occurred".
Can you check that ? The name of log file is Logs.txt.
Thanks.
-
0
@rvanwoezik Thanks for your snippit for the url rewrite.
I found that there was a problem with the routing because the server that is hosting the application is in another domain that is not trusted. This caused some redirects to fail.
Thanks for the quick reply.