Search code examples
.netazure-ad-b2cazure-ad-msal

ERR_SSL_PROTOCOL_ERROR in browser


We have MVC based app. In this app, we are tryng to integrate Azure AD B2C Authentication. We have added all the configuration and code required as per the sample code provided by Microsoft.

What did you try?

When we start the app, Azure Login Page appears (configured through user flows), we key-in the credentials and click the submit button. After some time, we see "ERR_SSL_PROTOCOL_ERROR" in browser. We are using chrome. As per some R&D on internet, it says we are missing SSL configuration.

enter image description here

Following is there in web config file <add key="ida:RedirectUri" value="https://localhost:53843/" /> The same url has been configured on Azire AD B2C Portal also.

We have worked on this before but for Angular 13 based app but we never configured any SSL so that app runs locally using "SSL".

I have checked with another person who worked on Azure AD B2C implementation on .NET before , they also never configured any "SSL" so that app runs locally using SSL.

What were you expecting?

Once user keys in the credential on the Azure AD B2C Login Page, we are expecting the code to hit "Index" method of the home controller which is not happening.

Any inputs/insight would be very valuable.

best regards, S


Solution

  • It's my mistake that I overlooked Lock in the browser address which means site is using SSL. While comparing the code, I also missed that fact.

    This is how I solved the issue:-

    1. Selected the solution and hit F4.
    2. Changed the "SSL" to true.
    3. Configured the new port on Azure APP service and updated web config file.
    4. Build and run the app.