1

当我尝试使用认证对 Web 服务进行身份验证时遇到了一些问题。服务器返回 500 并且 xml 结果包含:“{100} Forbidden. You are not allowed to access that resource..” 这意味着身份验证似乎不起作用。请注意,证书已安装在我的计算机和接收器上。我可以通过“thrusted publishers”和“other people”中的IE“Certificate”看到它。您必须知道,如果我使用带有用户名和密码令牌的标题,它会完美运行。

这是我的 HTTPRequest 代码

  Dim soapAction As String = "http://www.starstandards.org/webservices/2005/10/transport/operations/ProcessMessage/v1_01/GetVehicleServiceHistory"

            'Create Connection 
            Dim requestObj As HttpWebRequest
            Dim responseObj As HttpWebResponse = Nothing

            requestObj = DirectCast(WebRequest.Create("https://gmservices.pp.gm.com:443/ProcessMessage"), HttpWebRequest)
            requestObj.AllowAutoRedirect = False
            requestObj.KeepAlive = False
            requestObj.Method = "POST"
            requestObj.Timeout = 600000


            Dim certEasydeal As X509Certificate = New X509Certificate("C:\test\easydeal.cer")

            requestObj.ClientCertificates.Add(certEasydeal)

            ' 10 minutes 
            requestObj.Headers.Add("SOAPAction", soapAction)
            requestObj.ContentType = "text/xml; charset=UTF-8"
            requestObj.UserAgent = "DSPIdentifier"
            requestObj.ContentLength = Convert.ToInt32(xmlContent.Length)


            'Write XML to Remote Host 
            Dim encoding As New System.Text.UTF8Encoding
            Dim encodedString As Byte() = encoding.GetBytes(xmlContent) 'EasyDeal.Common.Utility.asciiEncodeData(xmlContent)
            Dim requestStream As Stream = requestObj.GetRequestStream()
            requestStream.Write(encodedString, 0, encodedString.Length)
            requestStream.Close()


            'Receive Response from Remote Host 
            Try
                responseObj = DirectCast(requestObj.GetResponse(), HttpWebResponse)
            Catch e2 As System.Net.WebException
                If e2.Status = WebExceptionStatus.ProtocolError Then
                    responseObj = DirectCast(e2.Response, HttpWebResponse)
                End If
            End Try

这是跟踪日志

System.Net Verbose: 0 : [9584] WebRequest::Create(https://gmservices.pp.gm.com/ProcessMessage)
System.Net Verbose: 0 : [9584] HttpWebRequest#60504916::HttpWebRequest(https://gmservices.pp.gm.com/ProcessMessage#287065899)
System.Net Information: 0 : [9584] Current OS installation type is 'Client'.
System.Net Information: 0 : [9584] RAS supported: True
System.Net Verbose: 0 : [9584] Exiting HttpWebRequest#60504916::HttpWebRequest() 
System.Net Verbose: 0 : [9584] Exiting WebRequest::Create()     -> HttpWebRequest#60504916
System.Net Verbose: 0 : [9584] HttpWebRequest#60504916::GetRequestStream()
System.Net Information: 0 : [9584] Associating HttpWebRequest#60504916 with ServicePoint#47567903
System.Net Information: 0 : [9584] Associating Connection#60180891 with HttpWebRequest#60504916
System.Net Information: 0 : [9584] Connection#60180891 - Created connection from 172.16.16.112:54052 to 198.208.154.146:443.
System.Net Information: 0 : [9584] TlsStream#23785539::.ctor(host=gmservices.pp.gm.com, #certs=1)
System.Net Information: 0 : [9584] Associating HttpWebRequest#60504916 with ConnectStream#63716305
System.Net Information: 0 : [9584] HttpWebRequest#60504916 - Request: POST /ProcessMessage HTTP/1.1

System.Net Information: 0 : [9584] SecureChannel#42282156::.ctor(hostname=gmservices.pp.gm.com, #clientCertificates=1, encryptionPolicy=RequireEncryption)
System.Net Information: 0 : [9584] Enumerating security packages:
System.Net Information: 0 : [9584]     Negotiate
System.Net Information: 0 : [9584]     NegoExtender
System.Net Information: 0 : [9584]     Kerberos
System.Net Information: 0 : [9584]     NTLM
System.Net Information: 0 : [9584]     Schannel
System.Net Information: 0 : [9584]     Microsoft Unified Security Protocol Provider
System.Net Information: 0 : [9584]     WDigest
System.Net Information: 0 : [9584]     TSSSP
System.Net Information: 0 : [9584]     pku2u
System.Net Information: 0 : [9584]     LiveSSP
System.Net Information: 0 : [9584]     CREDSSP
System.Net Information: 0 : [9584] SecureChannel#42282156 - Attempting to restart the session using the user-provided certificate: [Version]
  V3

[Subject]
  CN=DT Soft Ltd, OU=Digital ID Class 3 - Microsoft Software Validation v2, O=DT Soft Ltd, L=Belize City, S=Belize, C=BZ
  Simple Name: DT Soft Ltd
  DNS Name: DT Soft Ltd

[Issuer]
  CN=VeriSign Class 3 Code Signing 2009-2 CA, OU=Terms of use at https://www.verisign.com/rpa (c)09, OU=VeriSign Trust Network, O="VeriSign, Inc.", C=US
  Simple Name: VeriSign Class 3 Code Signing 2009-2 CA
  DNS Name: VeriSign Class 3 Code Signing 2009-2 CA

[Serial Number]
  109F1DAAAFB83315A6B64A6EED82D816

[Not Before]
  03/11/2009 7:00:00 PM

[Not After]
  03/11/2012 7:59:59 PM

[Thumbprint]
  5557C0953FBD9F93745B214FB2483E9369B597F0

[Signature Algorithm]
  sha1RSA(1.2.840.113549.1.1.5)

[Public Key]
  Algorithm: RSA
  Length: 1024
  Key Blob: 30 81 89 02 81 81 00 98 d4 3c 8b db f9 ab f7 b0 62 8e 0f 5c 14 6e 0a 20 d1 17 7f 55 06 43 08 23 87 48 8e e4 6b 02 70 ec f7 bd 62 c4 c5 f1 4d 3f a8 56 8f 9c ce ea 46 9b f3 25 ce a2 06 5e 76 36 92 98 c7 81 94 b8 25 24 61 c5 e5 ....
System.Net Information: 0 : [9584] SecureChannel#42282156 - Left with 1 client certificates to choose from.
System.Net Information: 0 : [9584] SecureChannel#42282156 - Trying to find a matching certificate in the certificate store.
System.Net Information: 0 : [9584] SecureChannel#42282156 - Locating the private key for the certificate: [Version]
  V3

[Subject]
  CN=DT Soft Ltd, OU=Digital ID Class 3 - Microsoft Software Validation v2, O=DT Soft Ltd, L=Belize City, S=Belize, C=BZ
  Simple Name: DT Soft Ltd
  DNS Name: DT Soft Ltd

[Issuer]
  CN=VeriSign Class 3 Code Signing 2009-2 CA, OU=Terms of use at https://www.verisign.com/rpa (c)09, OU=VeriSign Trust Network, O="VeriSign, Inc.", C=US
  Simple Name: VeriSign Class 3 Code Signing 2009-2 CA
  DNS Name: VeriSign Class 3 Code Signing 2009-2 CA

[Serial Number]
  109F1DAAAFB83315A6B64A6EED82D816

[Not Before]
  03/11/2009 7:00:00 PM

[Not After]
  03/11/2012 7:59:59 PM

[Thumbprint]
  5557C0953FBD9F93745B214FB2483E9369B597F0

[Signature Algorithm]
  sha1RSA(1.2.840.113549.1.1.5)

[Public Key]
  Algorithm: RSA
  Length: 1024
  Key Blob: 30 81 89 02 81 81 00 98 d4 3c 8b db f9 ab f7 b0 62 8e 0f 5c 14 6e 0a 20 d1 17 7f 55 06 43 08 23 87 48 8e e4 6b 02 70 ec f7 bd 62 c4 c5 f1 4d 3f a8 56 8f 9c ce ea 46 9b f3 25 ce a2 06 5e 76 36 92 98 c7 81 94 b8 25 24 61 c5 e5 ....
System.Net Information: 0 : [9584] SecureChannel#42282156 - Cannot find the certificate in either the LocalMachine store or the CurrentUser store.
System.Net Information: 0 : [9584] AcquireCredentialsHandle(package = Microsoft Unified Security Protocol Provider, intent  = Outbound, scc     = System.Net.SecureCredential)
System.Net Information: 0 : [9584] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = (null), targetName = gmservices.pp.gm.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [9584] InitializeSecurityContext(In-Buffer length=0, Out-Buffer length=124, returned code=ContinueNeeded).
System.Net Information: 0 : [9584] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 4b0f798:4b75a68, targetName = gmservices.pp.gm.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [9584] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=ContinueNeeded).
System.Net Information: 0 : [9584] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 4b0f798:4b75a68, targetName = gmservices.pp.gm.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [9584] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=ContinueNeeded).
System.Net Information: 0 : [9584] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 4b0f798:4b75a68, targetName = gmservices.pp.gm.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [9584] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=CredentialsNeeded).
System.Net Information: 0 : [9584] SecureChannel#42282156 - We have user-provided certificates. The server has specified 36 issuer(s). Looking for certificates that match any of the issuers.
System.Net Information: 0 : [9584] SecureChannel#42282156 - Selected certificate: [Version]
  V3

[Subject]
  CN=DT Soft Ltd, OU=Digital ID Class 3 - Microsoft Software Validation v2, O=DT Soft Ltd, L=Belize City, S=Belize, C=BZ
  Simple Name: DT Soft Ltd
  DNS Name: DT Soft Ltd

[Issuer]
  CN=VeriSign Class 3 Code Signing 2009-2 CA, OU=Terms of use at https://www.verisign.com/rpa (c)09, OU=VeriSign Trust Network, O="VeriSign, Inc.", C=US
  Simple Name: VeriSign Class 3 Code Signing 2009-2 CA
  DNS Name: VeriSign Class 3 Code Signing 2009-2 CA

[Serial Number]
  109F1DAAAFB83315A6B64A6EED82D816

[Not Before]
  03/11/2009 7:00:00 PM

[Not After]
  03/11/2012 7:59:59 PM

[Thumbprint]
  5557C0953FBD9F93745B214FB2483E9369B597F0

[Signature Algorithm]
  sha1RSA(1.2.840.113549.1.1.5)

[Public Key]
  Algorithm: RSA
  Length: 1024
  Key Blob: 30 81 89 02 81 81 00 98 d4 3c 8b db f9 ab f7 b0 62 8e 0f 5c 14 6e 0a 20 d1 17 7f 55 06 43 08 23 87 48 8e e4 6b 02 70 ec f7 bd 62 c4 c5 f1 4d 3f a8 56 8f 9c ce ea 46 9b f3 25 ce a2 06 5e 76 36 92 98 c7 81 94 b8 25 24 61 c5 e5 ....
System.Net Information: 0 : [9584] SecureChannel#42282156 - Left with 1 client certificates to choose from.
System.Net Information: 0 : [9584] SecureChannel#42282156 - Trying to find a matching certificate in the certificate store.
System.Net Information: 0 : [9584] SecureChannel#42282156 - Locating the private key for the certificate: [Version]
  V3

[Subject]
  CN=DT Soft Ltd, OU=Digital ID Class 3 - Microsoft Software Validation v2, O=DT Soft Ltd, L=Belize City, S=Belize, C=BZ
  Simple Name: DT Soft Ltd
  DNS Name: DT Soft Ltd

[Issuer]
  CN=VeriSign Class 3 Code Signing 2009-2 CA, OU=Terms of use at https://www.verisign.com/rpa (c)09, OU=VeriSign Trust Network, O="VeriSign, Inc.", C=US
  Simple Name: VeriSign Class 3 Code Signing 2009-2 CA
  DNS Name: VeriSign Class 3 Code Signing 2009-2 CA

[Serial Number]
  109F1DAAAFB83315A6B64A6EED82D816

[Not Before]
  03/11/2009 7:00:00 PM

[Not After]
  03/11/2012 7:59:59 PM

[Thumbprint]
  5557C0953FBD9F93745B214FB2483E9369B597F0

[Signature Algorithm]
  sha1RSA(1.2.840.113549.1.1.5)

[Public Key]
  Algorithm: RSA
  Length: 1024
  Key Blob: 30 81 89 02 81 81 00 98 d4 3c 8b db f9 ab f7 b0 62 8e 0f 5c 14 6e 0a 20 d1 17 7f 55 06 43 08 23 87 48 8e e4 6b 02 70 ec f7 bd 62 c4 c5 f1 4d 3f a8 56 8f 9c ce ea 46 9b f3 25 ce a2 06 5e 76 36 92 98 c7 81 94 b8 25 24 61 c5 e5 ....
System.Net Information: 0 : [9584] SecureChannel#42282156 - Cannot find the certificate in either the LocalMachine store or the CurrentUser store.
System.Net Information: 0 : [9584] Using the cached credential handle.
System.Net Information: 0 : [9584] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 4b0f798:4b75a68, targetName = gmservices.pp.gm.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [9584] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=205, returned code=ContinueNeeded).
System.Net Information: 0 : [9584] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 4b0f798:4b75a68, targetName = gmservices.pp.gm.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [9584] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=ContinueNeeded).
System.Net Information: 0 : [9584] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 4b0f798:4b75a68, targetName = gmservices.pp.gm.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation)
System.Net Information: 0 : [9584] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=OK).
System.Net Information: 0 : [9584] Remote certificate: [Version]
  V3

[Subject]
  CN=gmservices.pp.gm.com, OU=Global Web Hosting, O=General Motors Corporation, L=Plano, S=Texas, C=US, SERIALNUMBER=sAZ0qkI2PgF74yWm-rXi94vBPG/Q-Ag6
  Simple Name: gmservices.pp.gm.com
  DNS Name: gmservices.pp.gm.com

[Issuer]
  OU=Equifax Secure Certificate Authority, O=Equifax, C=US
  Simple Name: Equifax Secure Certificate Authority

[Serial Number]
  0E7F80

[Not Before]
  21/12/2009 4:57:17 AM

[Not After]
  21/12/2012 6:02:41 PM

[Thumbprint]
  13B7B4207DB271CC0BA8625A892181F2A9D9F7A3

[Signature Algorithm]
  sha1RSA(1.2.840.113549.1.1.5)

[Public Key]
  Algorithm: RSA
  Length: 1024
  Key Blob: 30 81 89 02 81 81 00 d6 14 b4 ae 0f 9e 59 b5 31 53 3e e3 22 1a 58 23 aa 65 52 ae d8 9f fd 4c a9 7e 27 13 3e ed 15 1c ac 0f f4 13 7a 8e 5f 40 57 e1 98 bd 5d 1e d0 93 d7 f0 e9 22 26 8a 2a 93 7e f0 d1 73 f8 52 27 17 ca 8a 64 ce 5a c7 18 1e c8 f6 bd 0b 15 2e 99 20 77 c4 89 3e 88 99 5a 56 c7 85 49 4c 9b 22 21 85 c6 99 98 d2 81 ff 45 a5 86 29 2a 42 ac 4e 6b ....
System.Net Information: 0 : [9584] SecureChannel#42282156 - Remote certificate was verified as valid by the user.
System.Net Information: 0 : [9584] ProcessAuthentication(Protocol=Tls, Cipher=Aes128 128 bit strength, Hash=Sha1 160 bit strength, Key Exchange=RsaKeyX 1024 bit strength).
System.Net Information: 0 : [9584] ConnectStream#63716305 - Sending headers
{
SOAPAction: http://www.starstandards.org/webservices/2005/10/transport/operations/ProcessMessage/v1_01/GetVehicleServiceHistory
Content-Type: text/xml; charset=UTF-8
User-Agent: DSPIdentifier
Host: gmservices.pp.gm.com
Content-Length: 2254
Expect: 100-continue
Connection: Close
}.
System.Net Information: 0 : [9584] Connection#60180891 - Received status line: Version=1.1, StatusCode=100, StatusDescription=Continue.
System.Net Information: 0 : [9584] Connection#60180891 - Received headers
{

}.
System.Net Verbose: 0 : [9584] Exiting HttpWebRequest#60504916::GetRequestStream()  -> ConnectStream#63716305
System.Net Verbose: 0 : [9584] ConnectStream#63716305::Write()
System.Net Verbose: 0 : [9584] Data from ConnectStream#63716305::Write
System.Net Verbose: 0 : [9584] (printing 1024 out of 2254)
System.Net Verbose: 0 : [9584] 00000000 : 3C 3F 78 6D 6C 20 76 65-72 73 69 6F 6E 3D 22 31 : <?xml version="1
System.Net Verbose: 0 : [9584] 00000010 : 2E 30 22 20 65 6E 63 6F-64 69 6E 67 3D 22 75 74 : .0" encoding="ut
System.Net Verbose: 0 : [9584] 00000020 : 66 2D 38 22 3F 3E 3C 65-6E 76 3A 45 6E 76 65 6C : f-8"?><env:Envel
System.Net Verbose: 0 : [9584] 00000030 : 6F 70 65 20 78 6D 6C 6E-73 3A 65 6E 76 3D 22 68 : ope xmlns:env="h
System.Net Verbose: 0 : [9584] 00000040 : 74 74 70 3A 2F 2F 73 63-68 65 6D 61 73 2E 78 6D : ttp://schemas.xm
System.Net Verbose: 0 : [9584] 00000050 : 6C 73 6F 61 70 2E 6F 72-67 2F 73 6F 61 70 2F 65 : lsoap.org/soap/e
System.Net Verbose: 0 : [9584] 00000060 : 6E 76 65 6C 6F 70 65 2F-22 20 78 6D 6C 6E 73 3A : nvelope/" xmlns:
System.Net Verbose: 0 : [9584] 00000070 : 78 73 69 3D 22 68 74 74-70 3A 2F 2F 77 77 77 2E : xsi="http://www.
System.Net Verbose: 0 : [9584] 00000080 : 77 33 2E 6F 72 67 2F 32-30 30 31 2F 58 4D 4C 53 : w3.org/2001/XMLS
System.Net Verbose: 0 : [9584] 00000090 : 63 68 65 6D 61 2D 69 6E-73 74 61 6E 63 65 22 20 : chema-instance" 
System.Net Verbose: 0 : [9584] 000000A0 : 78 6D 6C 6E 73 3A 78 73-64 3D 22 68 74 74 70 3A : xmlns:xsd="http:
System.Net Verbose: 0 : [9584] 000000B0 : 2F 2F 77 77 77 2E 77 33-2E 6F 72 67 2F 32 30 30 : //www.w3.org/200
System.Net Verbose: 0 : [9584] 000000C0 : 31 2F 58 4D 4C 53 63 68-65 6D 61 22 3E 3C 65 6E : 1/XMLSchema"><en
System.Net Verbose: 0 : [9584] 000000D0 : 76 3A 48 65 61 64 65 72-20 78 6D 6C 6E 73 3A 77 : v:Header xmlns:w
System.Net Verbose: 0 : [9584] 000000E0 : 73 75 3D 22 68 74 74 70-3A 2F 2F 64 6F 63 73 2E : su="http://docs.
System.Net Verbose: 0 : [9584] 000000F0 : 6F 61 73 69 73 2D 6F 70-65 6E 2E 6F 72 67 2E 77 : oasis-open.org.w
System.Net Verbose: 0 : [9584] 00000100 : 73 73 2F 32 30 30 34 2F-30 31 2F 6F 61 73 69 73 : ss/2004/01/oasis
System.Net Verbose: 0 : [9584] 00000110 : 2D 32 30 30 34 30 31 2D-77 73 73 2D 77 73 73 65 : -200401-wss-wsse
System.Net Verbose: 0 : [9584] 00000120 : 63 75 72 69 74 79 2D 75-74 69 6C 69 74 79 2D 31 : curity-utility-1
System.Net Verbose: 0 : [9584] 00000130 : 2E 30 2E 78 73 64 22 20-78 6D 6C 6E 73 3A 77 73 : .0.xsd" xmlns:ws
System.Net Verbose: 0 : [9584] 00000140 : 73 65 3D 22 68 74 74 70-3A 2F 2F 64 6F 63 73 2E : se="http://docs.
System.Net Verbose: 0 : [9584] 00000150 : 6F 61 73 69 73 2D 6F 70-65 6E 2E 6F 72 67 2F 77 : oasis-open.org/w
System.Net Verbose: 0 : [9584] 00000160 : 73 73 2F 32 30 30 34 2F-30 31 2F 6F 61 73 69 73 : ss/2004/01/oasis
System.Net Verbose: 0 : [9584] 00000170 : 2D 32 30 30 34 30 31 2D-77 73 73 2D 77 73 73 65 : -200401-wss-wsse
System.Net Verbose: 0 : [9584] 00000180 : 63 75 72 69 74 79 2D 73-65 63 65 78 74 2D 31 2E : curity-secext-1.
System.Net Verbose: 0 : [9584] 00000190 : 30 2E 78 73 64 22 3E 3C-70 61 79 6C 6F 61 64 4D : 0.xsd"><payloadM
System.Net Verbose: 0 : [9584] 000001A0 : 61 6E 69 66 65 73 74 20-78 6D 6C 6E 73 3D 22 68 : anifest xmlns="h
System.Net Verbose: 0 : [9584] 000001B0 : 74 74 70 3A 2F 2F 77 77-77 2E 73 74 61 72 73 74 : ttp://www.starst
System.Net Verbose: 0 : [9584] 000001C0 : 61 6E 64 61 72 64 73 2E-6F 72 67 2F 77 65 62 73 : andards.org/webs
System.Net Verbose: 0 : [9584] 000001D0 : 65 72 76 69 63 65 73 2F-32 30 30 35 2F 31 30 2F : ervices/2005/10/
System.Net Verbose: 0 : [9584] 000001E0 : 74 72 61 6E 73 70 6F 72-74 22 3E 3C 6D 61 6E 69 : transport"><mani
System.Net Verbose: 0 : [9584] 000001F0 : 66 65 73 74 20 63 6F 6E-74 65 6E 74 49 44 3D 22 : fest contentID="
System.Net Verbose: 0 : [9584] 00000200 : 43 6F 6E 74 65 6E 74 30-22 20 6E 61 6D 65 73 70 : Content0" namesp
System.Net Verbose: 0 : [9584] 00000210 : 61 63 65 55 52 49 3D 22-68 74 74 70 3A 2F 2F 77 : aceURI="http://w
System.Net Verbose: 0 : [9584] 00000220 : 77 77 77 2E 73 74 61 72-73 74 61 6E 64 61 72 64 : www.starstandard
System.Net Verbose: 0 : [9584] 00000230 : 73 2E 6F 72 67 2F 53 54-41 52 22 20 65 6C 65 6D : s.org/STAR" elem
System.Net Verbose: 0 : [9584] 00000240 : 65 6E 74 3D 22 47 65 74-56 65 68 69 63 6C 65 53 : ent="GetVehicleS
System.Net Verbose: 0 : [9584] 00000250 : 65 72 76 69 63 65 48 69-73 74 6F 72 79 22 20 76 : erviceHistory" v
System.Net Verbose: 0 : [9584] 00000260 : 65 72 73 69 6F 6E 3D 22-32 2E 30 31 22 20 2F 3E : ersion="2.01" />
System.Net Verbose: 0 : [9584] 00000270 : 3C 2F 70 61 79 6C 6F 61-64 4D 61 6E 69 66 65 73 : </payloadManifes
System.Net Verbose: 0 : [9584] 00000280 : 74 3E 3C 77 73 73 65 3A-53 65 63 75 72 69 74 79 : t><wsse:Security
System.Net Verbose: 0 : [9584] 00000290 : 3E 3C 77 73 75 3A 54 69-6D 65 73 74 61 6D 70 3E : ><wsu:Timestamp>
System.Net Verbose: 0 : [9584] 000002A0 : 3C 77 73 75 3A 43 72 65-61 74 65 64 3E 32 30 31 : <wsu:Created>201
System.Net Verbose: 0 : [9584] 000002B0 : 32 2D 30 37 2D 30 33 54-31 38 3A 32 30 3A 30 39 : 2-07-03T18:20:09
System.Net Verbose: 0 : [9584] 000002C0 : 5A 3C 2F 77 73 75 3A 43-72 65 61 74 65 64 3E 3C : Z</wsu:Created><
System.Net Verbose: 0 : [9584] 000002D0 : 77 73 75 3A 45 78 70 69-72 65 73 3E 32 30 31 32 : wsu:Expires>2012
System.Net Verbose: 0 : [9584] 000002E0 : 2D 30 37 2D 30 33 54 31-38 3A 32 35 3A 30 39 5A : -07-03T18:25:09Z
System.Net Verbose: 0 : [9584] 000002F0 : 3C 2F 77 73 75 3A 45 78-70 69 72 65 73 3E 3C 2F : </wsu:Expires></
System.Net Verbose: 0 : [9584] 00000300 : 77 73 75 3A 54 69 6D 65-73 74 61 6D 70 3E 3C 2F : wsu:Timestamp></
System.Net Verbose: 0 : [9584] 00000310 : 77 73 73 65 3A 53 65 63-75 72 69 74 79 3E 3C 2F : wsse:Security></
System.Net Verbose: 0 : [9584] 00000320 : 65 6E 76 3A 48 65 61 64-65 72 3E 3C 65 6E 76 3A : env:Header><env:
System.Net Verbose: 0 : [9584] 00000330 : 42 6F 64 79 3E 3C 50 72-6F 63 65 73 73 4D 65 73 : Body><ProcessMes
System.Net Verbose: 0 : [9584] 00000340 : 73 61 67 65 20 78 6D 6C-6E 73 3D 22 68 74 74 70 : sage xmlns="http
System.Net Verbose: 0 : [9584] 00000350 : 3A 2F 2F 77 77 77 2E 73-74 61 72 73 74 61 6E 64 : ://www.starstand
System.Net Verbose: 0 : [9584] 00000360 : 61 72 64 73 2E 6F 72 67-2F 77 65 62 73 65 72 76 : ards.org/webserv
System.Net Verbose: 0 : [9584] 00000370 : 69 63 65 73 2F 32 30 30-35 2F 31 30 2F 74 72 61 : ices/2005/10/tra
System.Net Verbose: 0 : [9584] 00000380 : 6E 73 70 6F 72 74 22 3E-3C 70 61 79 6C 6F 61 64 : nsport"><payload
System.Net Verbose: 0 : [9584] 00000390 : 3E 3C 63 6F 6E 74 65 6E-74 20 69 64 3D 22 43 6F : ><content id="Co
System.Net Verbose: 0 : [9584] 000003A0 : 6E 74 65 6E 74 30 22 3E-3C 73 3A 47 65 74 56 65 : ntent0"><s:GetVe
System.Net Verbose: 0 : [9584] 000003B0 : 68 69 63 6C 65 53 65 72-76 69 63 65 48 69 73 74 : hicleServiceHist
System.Net Verbose: 0 : [9584] 000003C0 : 6F 72 79 20 6C 61 6E 67-3D 22 66 72 2D 46 52 22 : ory lang="fr-FR"
System.Net Verbose: 0 : [9584] 000003D0 : 20 78 6D 6C 6E 73 3A 67-77 6D 3D 22 68 74 74 70 :  xmlns:gwm="http
System.Net Verbose: 0 : [9584] 000003E0 : 3A 2F 2F 77 77 77 2E 67-6D 2E 63 6F 6D 2F 32 30 : ://www.gm.com/20
System.Net Verbose: 0 : [9584] 000003F0 : 30 36 2F 47 57 4D 22 20-78 6D 6C 6E 73 3A 73 3D : 06/GWM" xmlns:s=
System.Net Verbose: 0 : [9584] Exiting ConnectStream#63716305::Write() 
System.Net Verbose: 0 : [9584] ConnectStream#63716305::Close()
System.Net Verbose: 0 : [9584] Exiting ConnectStream#63716305::Close() 
System.Net Verbose: 0 : [9584] HttpWebRequest#60504916::GetResponse()
System.Net Information: 0 : [9584] Connection#60180891 - Received status line: Version=1.1, StatusCode=500, StatusDescription=Forbidden.
System.Net Information: 0 : [9584] Connection#60180891 - Received headers
{
Connection: close
Content-Length: 480
Content-Type: text/xml; charset=utf-8
Date: Tue, 03 Jul 2012 18:20:36 GMT
Server: ACE XML Gateway
}.
System.Net Information: 0 : [9584] ConnectStream#63194865::ConnectStream(Buffered 480 bytes.)
System.Net Information: 0 : [9584] Associating HttpWebRequest#60504916 with ConnectStream#63194865
System.Net Information: 0 : [9584] Associating HttpWebRequest#60504916 with HttpWebResponse#25196644
System.Net Verbose: 0 : [9584] ConnectStream#63194865::Read()
System.Net Verbose: 0 : [9584] Data from ConnectStream#63194865::Read
System.Net Verbose: 0 : [9584] 00000000 : 3C 3F 78 6D 6C 20 76 65-72 73 69 6F 6E 3D 22 31 : <?xml version="1
System.Net Verbose: 0 : [9584] 00000010 : 2E 30 22 20 65 6E 63 6F-64 69 6E 67 3D 22 55 54 : .0" encoding="UT
System.Net Verbose: 0 : [9584] 00000020 : 46 2D 38 22 3F 3E 0A 3C-73 6F 61 70 3A 45 6E 76 : F-8"?>.<soap:Env
System.Net Verbose: 0 : [9584] 00000030 : 65 6C 6F 70 65 20 78 6D-6C 6E 73 3A 73 6F 61 70 : elope xmlns:soap
System.Net Verbose: 0 : [9584] 00000040 : 3D 22 68 74 74 70 3A 2F-2F 73 63 68 65 6D 61 73 : ="http://schemas
System.Net Verbose: 0 : [9584] 00000050 : 2E 78 6D 6C 73 6F 61 70-2E 6F 72 67 2F 73 6F 61 : .xmlsoap.org/soa
System.Net Verbose: 0 : [9584] 00000060 : 70 2F 65 6E 76 65 6C 6F-70 65 2F 22 3E 3C 73 6F : p/envelope/"><so
System.Net Verbose: 0 : [9584] 00000070 : 61 70 3A 42 6F 64 79 3E-3C 73 6F 61 70 3A 46 61 : ap:Body><soap:Fa
System.Net Verbose: 0 : [9584] 00000080 : 75 6C 74 3E 3C 73 6F 61-70 3A 66 61 75 6C 74 63 : ult><soap:faultc
System.Net Verbose: 0 : [9584] 00000090 : 6F 64 65 3E 73 6F 61 70-3A 43 6C 69 65 6E 74 3C : ode>soap:Client<
System.Net Verbose: 0 : [9584] 000000A0 : 2F 73 6F 61 70 3A 66 61-75 6C 74 63 6F 64 65 3E : /soap:faultcode>
System.Net Verbose: 0 : [9584] 000000B0 : 3C 73 6F 61 70 3A 66 61-75 6C 74 73 74 72 69 6E : <soap:faultstrin
System.Net Verbose: 0 : [9584] 000000C0 : 67 3E 46 6F 72 62 69 64-64 65 6E 3C 2F 73 6F 61 : g>Forbidden</soa
System.Net Verbose: 0 : [9584] 000000D0 : 70 3A 66 61 75 6C 74 73-74 72 69 6E 67 3E 3C 73 : p:faultstring><s
System.Net Verbose: 0 : [9584] 000000E0 : 6F 61 70 3A 66 61 75 6C-74 61 63 74 6F 72 3E 69 : oap:faultactor>i
System.Net Verbose: 0 : [9584] 000000F0 : 6E 74 65 72 6E 61 6C 2D-66 69 72 65 77 61 6C 6C : nternal-firewall
System.Net Verbose: 0 : [9584] 00000100 : 3C 2F 73 6F 61 70 3A 66-61 75 6C 74 61 63 74 6F : </soap:faultacto
System.Net Verbose: 0 : [9584] 00000110 : 72 3E 3C 73 6F 61 70 3A-64 65 74 61 69 6C 20 78 : r><soap:detail x
System.Net Verbose: 0 : [9584] 00000120 : 6D 6C 6E 73 3A 64 65 74-3D 22 68 74 74 70 3A 2F : mlns:det="http:/
System.Net Verbose: 0 : [9584] 00000130 : 2F 72 65 61 63 74 69 76-69 74 79 2E 63 6F 6D 2F : /reactivity.com/
System.Net Verbose: 0 : [9584] 00000140 : 22 3E 3C 64 65 74 3A 64-65 74 61 69 6C 6D 65 73 : "><det:detailmes
System.Net Verbose: 0 : [9584] 00000150 : 73 61 67 65 3E 7B 31 30-30 7D 20 46 6F 72 62 69 : sage>{100} Forbi
System.Net Verbose: 0 : [9584] 00000160 : 64 64 65 6E 2E 20 20 59-6F 75 20 61 72 65 20 6E : dden.  You are n
System.Net Verbose: 0 : [9584] 00000170 : 6F 74 20 61 6C 6C 6F 77-65 64 20 74 6F 20 61 63 : ot allowed to ac
System.Net Verbose: 0 : [9584] 00000180 : 63 65 73 73 20 74 68 61-74 20 72 65 73 6F 75 72 : cess that resour
System.Net Verbose: 0 : [9584] 00000190 : 63 65 2E 0A 3C 2F 64 65-74 3A 64 65 74 61 69 6C : ce..</det:detail
System.Net Verbose: 0 : [9584] 000001A0 : 6D 65 73 73 61 67 65 3E-3C 2F 73 6F 61 70 3A 64 : message></soap:d
System.Net Verbose: 0 : [9584] 000001B0 : 65 74 61 69 6C 3E 3C 2F-73 6F 61 70 3A 46 61 75 : etail></soap:Fau
System.Net Verbose: 0 : [9584] 000001C0 : 6C 74 3E 3C 2F 73 6F 61-70 3A 42 6F 64 79 3E 3C : lt></soap:Body><
System.Net Verbose: 0 : [9584] 000001D0 : 2F 73 6F 61 70 3A 45 6E-76 65 6C 6F 70 65 3E 0A : /soap:Envelope>.
System.Net Verbose: 0 : [9584] Exiting ConnectStream#63194865::Read()   -> 480#480
System.Net Verbose: 0 : [9584] ConnectStream#63194865::Read()
System.Net Verbose: 0 : [9584] Exiting ConnectStream#63194865::Read()   -> 0#0
System.Net Error: 0 : [9584] Exception in the HttpWebRequest#60504916::GetResponse - The remote server returned an error: (500) Internal Server Error.
System.Net Verbose: 0 : [9584] HttpWebResponse#25196644::GetResponseStream()
System.Net Information: 0 : [9584] ContentLength=480
System.Net Verbose: 0 : [9584] Exiting HttpWebResponse#25196644::GetResponseStream()    -> SyncMemoryStream#20467555
4

1 回答 1

0

我通过将私钥 PFX 正确链接到证书来解决问题。

您可以在我的行中看到问题, Cannot find the certificate in either the LocalMachine store or the CurrentUser store.尽管起初它是错误的。但是私钥没有正确链接到证书,也没有真正呈现给发件人。

为此,只需制作一个私钥 (.pfx) 并将其安装到您的计算机或服务器 (.cer) 上的指定证书中。可以清楚的看到证书是否绑定了私钥

这是一个图像示例:http: //i.stack.imgur.com/pR6LO.png

于 2012-07-11T14:51:04.217 回答