which component is getting the error? if the browser, your localhost SSL certificate is not trusted. if the web server, then you probably have not enabled TSL 1.2
ERR_SSL_PROTOCOL_ERROR when connecting to Azure active directory
I am trying to connect to azure active directory based on this article:
I am running an MVC application and when I run the application connecting to azure active directory, my username and password is accepted, but then after that, I get an error showing "ERR_SSL_PROTOCOL_ERROR" . below is my sigin code:
public void SignIn()
{
if (!Request.IsAuthenticated)
{
HttpContext.GetOwinContext().Authentication.Challenge(
new AuthenticationProperties { RedirectUri = "/" },
OpenIdConnectAuthenticationDefaults.AuthenticationType);
}
}
below is my configuration in the web.config file:
<appSettings>
<add key="ClientId" value="XXXXXXXXX" />
<add key="Tenant" value="XXXXXXXXXXXXXXXX" />
<add key="Authority" value="https://login.microsoftonline.com/{0}/v2.0" />
<add key="redirectUri" value="https://localhost:44347/login/oauth2/code/" />
</appSettings>
My application is running on port # 44368
https://localhost:44368/
Below is the screen shot:
My applicationhost.config file binding information is like this:
<bindings>
<binding protocol="https" bindingInformation="*:44368:localhost" />
<binding protocol="http" bindingInformation="*:53016:localhost" />
</bindings>
I haven't changed any default settings that are created by the application. I didn't change the applicationhost.config file or the port number of the application. My redirectURI in the azure portal is 44347. Do I need to change anything in the applicationhost.config file or application port # in order to get rid of ERR_SSL_PROTOCOL_ERROR
Any help will be greatly appreciated.