-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Web Public The SSL connection could not be established when published on IIS #11844
Comments
|
In Web.Public, HttpApi.Host and IdentityServer. HttpApi.Host and IdentityServer context.Services.AddAuthentication()
.AddJwtBearer(options =>{
options.BackchannelHttpHandler = new HttpClientHandler
{
ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
};) Web.Public context.Services.AddAuthentication()
.AddAbpOpenIdConnect("oidc", options => {
options.BackchannelHttpHandler = new HttpClientHandler
{
ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
};) |
Please try to configure the HttpClient's handler. |
I think you are trying to bypass SSL verification for identityserver. You can generate a self-signed pfx file and use it in identityserver for signing the tokens as in this sample. |
Adding PreConfigure<AbpHttpClientBuilderOptions>(options =>
{
options.ProxyClientBuildActions.Add((remoteServiceName, clientBuilder) =>
{
clientBuilder.ConfigurePrimaryHttpMessageHandler(() => new HttpClientHandler
{
ClientCertificateOptions = ClientCertificateOption.Manual,
ServerCertificateCustomValidationCallback =
(httpRequestMessage, cert, cetChain, policyErrors) =>
{
return true;
}
});
});
}); To public override void PreConfigureServices(ServiceConfigurationContext context) while keeping context.Services.AddAuthentication()
.AddAbpOpenIdConnect("oidc", options => {
options.BackchannelHttpHandler = new HttpClientHandler
{
ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
};) Worked just fine |
ABP Framework version: 5.1.4.
I've published HttpApi.Host and IdentityServer on IIS and they are working correctly
But when I publish Web.Public I get the error above
I check all configurations in appsettings and they are correct
I
and
in
AddAuthentication
method in Web.Public project to accept any certificate but with no luckNote: I'm using self signed certificate
Web.Public appsettings
The text was updated successfully, but these errors were encountered: