Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

Client certificate / Classic ASP / ServerXMLHTTP / Cannot create a file when that file already exists

$
0
0

We have a Classic ASP page that tries to call a SOAP webservice, using ServerXMLHTTP.

We have the client certificate for authentication.
We have all the needed CA certificates so that the certificate path works,
and in Windows the certificate shows as being OK.

We've installed a self-signed server certificate,
and the .asp page is called using https protocol.

The object in the asp page is created like this:

Dim objXMLHTTP
set objXMLHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP.6.0")

The option about certificate is like this:

dim SXH_OPTION_SELECT_CLIENT_SSL_CERT : SXH_OPTION_SELECT_CLIENT_SSL_CERT = 3
objXMLHTTP.setOption SXH_OPTION_SELECT_CLIENT_SSL_CERT, "LOCAL_MACHINE\My\The-Company-Name Ltd"

Then next code:

objXMLHTTP.open "post", "https://webservicecompany.com/somesubfolder/SomeService", false


Then some headers are added, like:

objXMLHTTP.setRequestHeader "User-Agent","HTTP/1.1"

(header lines are copied from SoapUI)

The XML message is stored in this variable:

dim strRequest

In the next phase, a HTTP 500 error occurs:

Call objXMLHTTP.send(strRequest) '<-----

    msxml6.dll error '800700b7'
   Cannot create a file when that file already exists.



And the code never gets further...

strResult = objXMLHTTP.responseText
'display the XML
response.write strResult


We have succesfully called the webservice using SoapUI,
so the client certificate and the XML should be ok.

Our server is IIS 7.5 running on Windows Web Server 2008 R2.

The website has its own application pool, and is running under ApplicationPoolIdentity.

The certificate is installed as Administrator, with mmc Certificates snap-in, for Local Computer.

How should I install the client certificate to make this work?
Any advice?


Viewing all articles
Browse latest Browse all 27852

Trending Articles