Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
ASP .Net
Problems with Security Certificates and Secure Servers
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="leeo, post: 1597346"] Hi We're using the following code to send data to a secure server and then get a response back from it: System.Net.ServicePointManager.CertificatePolicy = New cCertificatePolicy wr = CType(WebRequest.Create(goSettings.NHSDPBClaimsURL), HttpWebRequest) nc = New NetworkCredential(goSettings.NHSUserName, goSettings.NHSPassword) wr.Credentials = nc wr.ContentType = "text/xml" wr.Method = "POST" xd = New XmlDocument xd.Load(gsAppPath & "\temp.xml") xw = New XmlTextWriter(wr.GetRequestStream(), Nothing) xd.WriteTo(xw) xw.Close() ws = CType(wr.GetResponse(), HttpWebResponse) <-- problem here sr = ws.GetResponseStream() rd = New StreamReader(sr) Now at first we had a hell of a time just being able to connect to the server until we found some useful tips on google groups about setting up our own certificate policy which always returns true on the CheckValidationResult method. This now allows us to send the data to the server correctly, however when it reaches the line that gets a reponse from the server, it falls over with the same old "Could not establish secure channel for SSL/TLS" even though it has clearly run the new policy and already uploaded data to using the webrequest object. The strange thing is, if the whole routine is run again by pressing the send button a second time it works fine. Does anyone know why we would be getting this problem, or a method to correct it? Thanks Lee [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
ASP .Net
Problems with Security Certificates and Secure Servers
Top