Search code examples
iishttp-status-code-403asp.net-core-2.2

Access denied http 403 net core 2.2 IIS deployed


I developed a REST api web application in net core 2.2

It has been deployed on IIS in HTTPS and works well.

I need to add an authentication by client certificate, so I followed the following steps:

  • authentication: disabled
  • ssl: certificate required Configuring
  • certificate authentication in One to One

Once this is done when I try to access my API I have a 403 error

Using ProcessMonitor I saw that the process was trying to access routes and that it generates "access denied"

access denied screenshot

But it is a REST api, the roads in question do not correspond to a path

I am stuck and need help on this


Solution

  • I solved my problem

    I added the certificate Current user / in intermediate certification authorities

    I also have my certicate root and client in Local Computer store (and also intermediate certification authorities)

    Finally I added the following key in the registry:

    [HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ SecurityProviders \ SCHANNEL]
    "SendTrustedIssuerList" = dword: 00000000
    "ClientAuthTrustMode" = dword: 00000001
    

    And so it works