By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,679 Members | 1,063 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,679 IT Pros & Developers. It's quick & easy.

SSL client/server communication

P: 56
I'm trying to build a client for a third party application that resides on the server and accepts SSL communication. i'm using this code:

tcpClient.Connect(m_IPAddress, m_Port)

Dim sslStream As New SslStream(tcpClient.GetStream, False, New Net.Security.RemoteCertificateValidationCallback(A ddressOf ValidateServerCertificate))

sslStream.AuthenticateAsClient(m_IPAddress)

If sslStream.CanWrite And sslStream.CanRead Then
Dim bytes(tcpClient.ReceiveBufferSize) As Byte
Dim sendBytes As [Byte]() = Encoding.ASCII.GetBytes(XMLStream)
sslStream.ReadTimeout = m_Timeout * 1000
sslStream.Write(sendBytes, 0, sendBytes.Length)
sslStream.Read(bytes, 0, CInt(tcpClient.ReceiveBufferSize))
SSLSend = Encoding.ASCII.GetString(bytes)
Else
If Not sslStream.CanRead Then
tcpClient.Close()
SSLSend = "0"
Else
If Not sslStream.CanWrite Then
tcpClient.Close()
SSLSend = "0"
End If
End If
End If

On the authenticate as client, I get an exception: A call to SSPI failed, see inner exception. Is the code I have correct? Is this a server problem?
Sep 17 '07 #1
Share this Question
Share on Google+
6 Replies


Plater
Expert 5K+
P: 7,872
What is the inner exception?
It will probably contain more insight onto the problem.
Sep 17 '07 #2

P: 56
It says "cannot obtain value".
Sep 17 '07 #3

Plater
Expert 5K+
P: 7,872
I am assuming that the underlying exception's message is "cannot obtain value"
and not that when you try to look at the underlying exception it tells you it cannot see it?
Sep 17 '07 #4

P: 56
I'm sorry. It says '"The Local Security Authority cannot be located"
Sep 17 '07 #5

Plater
Expert 5K+
P: 7,872
I'm sorry. It says '"The Local Security Authority cannot be located"
hmm, well that's LSASS(.exe). Do you have all that stuff running on that system?
Sep 17 '07 #6

P: 56
Yes. It the lsass.exe is running
Sep 17 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.