Could not establish secure channel for SSL/TLS with authority '*'

前端 未结 9 1649
感情败类
感情败类 2020-12-14 17:59

I must consume a PHP webservice which has a SSL certificate. My .net 3.5 Class library references the webservice with \'Add Service references\' in Visualstudio 2010 (WCF ri

9条回答
  •  庸人自扰
    2020-12-14 18:41

    Here is what fixed for me:

    1) Make sure you are running Visual Studio as Administrator

    2) Install and run winhttpcertcfg.exe to grant access

    https://msdn.microsoft.com/en-us/library/windows/desktop/aa384088(v=vs.85).aspx

    The command is similar to below: (enter your certificate subject and service name)

    winhttpcertcfg -g -c LOCAL_MACHINE\MY -s "certificate subject" -a "NetworkService"
    winhttpcertcfg -g -c LOCAL_MACHINE\MY -s "certificate subject" -a "LOCAL SERVICE"
    winhttpcertcfg -g -c LOCAL_MACHINE\MY -s "certificate subject" -a "My Apps Service Account"
    

提交回复
热议问题