471,338 Members | 1,257 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,338 software developers and data experts.

The underlying connection was closed: An unexpected error occurred on a send

Hi!
I have a problem - after deploying application in client
environment, on some client machines occured error.
Environment:
App server: ASP.NET WebService/Win 2003/ secured SSL (.NET 2.0)
Client app: SmartClient - WinForms (.NET 2.0)

I trust all server cetrificates - at the start of client application
I call:

System.Net.ServicePointManager.ServerCertificateVa lidationCallback +=
delegate(
object sender,
System.Security.Cryptography.X509Certificates.X509 Certificate certificate,
System.Security.Cryptography.X509Certificates.X509 Chain chain,
System.Net.Security.SslPolicyErrors sslPolicyErrors)
{
return true;
};

Any ideas?
Regards

Mrozik
Error stack:

System.Net.WebException: The underlying connection was closed: An
unexpected error occurred on a send. ---System.IO.IOException: The
handshake failed due to an unexpected packet format.
at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32
readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer,
AsyncProtocolRequest asyncRequest)
at
System.Net.Security.SslState.CheckCompletionBefore NextReceive(ProtocolToken
message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32
count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(B oolean
receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication (LazyAsyncResult
lazyResult)
at System.Net.TlsStream.CallProcessAuthentication(Obj ect state)
at System.Threading.ExecutionContext.runTryCode(Objec t userData)
at
System.Runtime.CompilerServices.RuntimeHelpers.Exe cuteCodeWithGuaranteedCleanup(TryCode
code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(Exec utionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionCon text
executionContext, ContextCallback callback, Object state)
at System.Net.TlsStream.ProcessAuthentication(LazyAsy ncResult result)
at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32
size)
at System.Net.ConnectStream.WriteHeaders(Boolean async)
--- End of inner exception stack trace ---
at
System.Web.Services.Protocols.WebClientProtocol.Ge tWebResponse(WebRequest
request)
at
System.Web.Services.Protocols.HttpWebClientProtoco l.GetWebResponse(WebRequest
request)
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
Jul 18 '07 #1
1 8617
On Wed, 18 Jul 2007 09:30:37 +0200, Mrozik <mr******@interia.plwrote:
Hi!
I have a problem - after deploying application in client
environment, on some client machines occured error.
Environment:
App server: ASP.NET WebService/Win 2003/ secured SSL (.NET 2.0)
Client app: SmartClient - WinForms (.NET 2.0)

I trust all server cetrificates - at the start of client application
I call:

System.Net.ServicePointManager.ServerCertificateVa lidationCallback
+= delegate(
object sender,
System.Security.Cryptography.X509Certificates.X509 Certificate
certificate,
System.Security.Cryptography.X509Certificates.X509 Chain chain,
System.Net.Security.SslPolicyErrors sslPolicyErrors)
{
return true;
};

Any ideas?
Regards

Mrozik
Error stack:

System.Net.WebException: The underlying connection was closed: An
unexpected error occurred on a send. ---System.IO.IOException: The
handshake failed due to an unexpected packet format.
[...]
I think it's configuration issue - error occured when client applications
connect to WebService using IP in address. When I change configuration and
try to
connect using machine name everything works OK.
But why error appears when using IP in WebService address - and only on
some machines?
Mrozik
Jul 18 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

26 posts views Thread by Rajeev Tipnis | last post: by
5 posts views Thread by =?Utf-8?B?V2VsdVI=?= | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.