HELP! SSL HTTPRequest Problem

J

jNorton

I have two servers in a web farm that are (as far as I can tell) configured
exactly the same. One server works fine when runnin the following code, the
other throws an exception. The code and execption are:

HttpWebRequest request;
request =
(HttpWebRequest)WebRequest.Create(@"https://wwwcie.ups.com/ups.app/xml/Track");
HttpWebResponse response;
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = authXml.Length + requestXml.Length;
StreamWriter requestString = new StreamWriter(request.GetRequestStream());
requestString.Write(authXml + requestXml);
requestString.Close();
request.Timeout = 15000;
response = (HttpWebResponse)request.GetResponse();
using (StreamReader sr = new StreamReader(response.GetResponseStream()))
{
return sr.ReadToEnd();
}


EXCEPTION:

System.Net.WebException: The underlying connection was closed: Could not
establish secure channel for SSL/TLS. --->
System.TypeInitializationException: The type initializer for
"System.Net.SecureChannel" threw an exception. --->
System.EntryPointNotFoundException: Unable to find an entry point named
EnumerateSecurityPackagesW in DLL security.dll. at
System.Net.NativeNTSSPI.EnumerateSecurityPackagesW(Int32& pkgnum, IntPtr&
arrayptr) at
System.Net.SSPISecureChannelType.EnumerateSecurityPackages(Int32& pkgnum,
IntPtr& arrayptr) at
System.Net.SSPIWrapper.EnumerateSecurityPackages(SSPIInterface SecModule) at
System.Net.SSPIWrapper.GetSupportedSecurityPackages(SSPIInterface SecModule)
at System.Net.SecureChannel..cctor() --- End of inner exception stack trace
--- at System.Net.SecureChannel..ctor(String hostname,
X509CertificateCollection clientCertificates) at
System.Net.TlsStream.Handshake(ProtocolToken message) --- End of inner
exception stack trace --- at System.Net.HttpWebRequest.CheckFinalStatus() at
System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult) at
System.Net.HttpWebRequest.GetRequestStream() at
NSP.Utilities.UPS.processUPSRequest(String requestXml, UPSRequestType type)


Any ideas?
 
C

Chris Botha

I guess it is the certificate issue, IE should prompt you to accept the
certificate if you use IE to connect SSL to the bad server.
There are some links down the group in a thread "Cannot access web server
after enable FIPS compliant cryptography" by Jener Silva dated 2/6/2005 2:14
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top