When running this from Postman, it Works swell, but when trying to run this from webclient it fails With System.Net.WebException: The underlaying Connection was closed: an unexpected error occourred on a send.
Could this be caused by lack of certificate? Is there another way of getting more errorinfo?
The code:
URIextra = 'Query.apsx?merchantId=' + MerchantID + '&token=' + Token + '&transactionId=' + TransactionId.
oURI = new System.Uri('epayment-test.bbs.no/.../' + URIextra).
oWeb = new System.Net.WebClient().
oWeb:Headers:Add("Content-Type", "text/xml").
lcRespons = oWeb:DownloadString(oURI).
What am I doing wrong?
//Geir Otto
I checked the diff between postman and webclient, and found that it was a typo …. .apsx instead of .aspx
I also had to add:
System.Net.ServicePointManager:SecurityProtocol = System.Net.SecurityProtocolType:Tls12.
Now it Works :-)
I checked the diff between postman and webclient, and found that it was a typo …. .apsx instead of .aspx
I also had to add:
System.Net.ServicePointManager:SecurityProtocol = System.Net.SecurityProtocolType:Tls12.
Now it Works :-)