473,289 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 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 8787
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

26
by: Rajeev Tipnis | last post by:
http://support.microsoft.com/default.aspx?scid=kb;en- us;819450 Questions: 1) Is this patch (fix) applicable to the .NET 1.1 Framework as well? That is, if we have Framework 1.1 (On...
1
by: Fredrik L | last post by:
Hi, We have an application outside the firewall who talks to a webservice inside the firewall. 9 times of 10 this works, but sometimes we got the error "The underlying connection was closed: An...
5
by: Vijayakrishna Pondala | last post by:
Hi, We are using the following error randomly, when accessing a webservice method/servlet hosted on JBoss application server: The underlying connection was closed: An unexpected error occurred...
4
by: Matthew.DelVecchio | last post by:
hello, i am developing an ASP.NET web app that consumes a 3rd party vendor webservice. it is my first one so while ive done my homework, im not an expert on the matter. our partner's...
3
by: Rahul Anand | last post by:
As per our requirements we have a web service which internally connects (Simple HTTP Post Request) to a remote server to initiate some work. We are calling the web service method asynchronously...
0
by: Mahesh Devjibhai Dhola | last post by:
Hi, I am getting the following exception when using webservice.. "The underlying connection was closed: An unexpected error occurred on a receive" I am not getting any innerexception so no clue...
2
by: Andrew Hunot | last post by:
I have VB code in VS2003 which creates a HttpWebRequest and performs a POST operation to a remote URL (an https site), which runs fine and receives a valid response. However exactly the same...
5
by: =?Utf-8?B?V2VsdVI=?= | last post by:
I have a web client application built on .Net Frameworks 2.0 that connects to a web service on IIS 6.0 via SSL and using X509 Client Certificates. At some locations (it works at others), I get the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

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.