Stephan Stieger
Stephan Stieger

Reputation: 43

Angular doesn't seem to function under HTTPS; it immediately returns a white screen. It loads indefinitely until the page crashes

Okay, my problem is that my Angular project runs perfectly fine under HTTP but not under HTTPS. When I start the program under HTTPS, the page only loads the project title in the tab, not the favicon. The page itself just keeps loading indefinitely, and even after hours, it's not finished. However, under HTTP, it works perfectly fine, and there's no issue with HTTP on the server either.

The certificates and keys should be fine; they apply to the entire server, and they are in use. There is a passphrase for the key, but I did not find a way to add it to the Angular command or the IIS. The other websites working under the same certificate also did not require a specific passphrase.

Step 1: I deployed the Angular website on the server, the web host being Microsoft Internet Information Services (IIS). There are already other sites running under HTTPS on IIS, so adding one more shouldn't be a problem. However, when I discovered that it wasn't working, I tinkered with IIS but couldn't find a solution.

Step 2: For testing purposes, I wanted to run the project locally under HTTPS using ng serve --ssl. I specified the .pem and .crt files in the angular.json. However, I encountered the following error:

An unhandled exception occurred: error:0480006C:PEM routines::no start line

When I tried the command with paths to the files (ng serve --ssl --ssl-key "Path" --ssl-cert "Path"), I got this

An unhandled exception occurred: error:1C800064:Provider routines::bad decrypt

Upvotes: 2

Views: 147

Answers (0)

Related Questions