Scenario:
C:\\MyCertificates\\
myWebService.ClientCertificates.Add(new X509Certificate.CreateFromCertFile(certPath));
Problem: WebService A is calling WebService B, and the returned exception is:
The request failed with HTTP status 403: Forbidden
This really means that the certificate was not sent in the request to WebService B.
I am under the assumption that installing this cert into the browser is not a solution. The browser settings typically are per-user, and I need to give the certificate to the user whose credentials the web service is running under. (eg Network Service, System, or whatever is in the IIS AppPool settings).
Question: How can I grant access or association to my certificate living at the specified directory location to the Network Service or other non-user account?
This Microsoft knowledgebase article may be of use:
Your web service 'A' would effectively be the ASP.NET application calling the web service as described in the article.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.