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

E

Emre Aydinceren

As 90% WS developers I am frustrated by this problem:

"An unhandled exception of type 'System.Net.WebException'
occurred in system.web.services.dll

Additional information: The underlying connection was
closed: An unexpected error occurred on a send."

I found a work around but Microsoft need to help me
identify the problem. And really need help.

Listen to this:

My Web Service box is a XP Pro Machine under the same
domain as I my development machine.

-Before I left the office I compiled a build and my
client (WS consumer worked fine). I published the .exe
file so other people in the organization may take a look
at it.

-I arrived at home. VPNed in (Nortel) . I fired the
visual studio and clicked run at debug mode.
I get this problem above. There has been no changes in
the source code at all!

-I went to the web site and downloaded my last published
build. It ran fine!

-In frustration I ran the exe file from project's release
folder manually. Since my compilation at home onlu
effected debug folder release folder was untouched. It
ran fine!!

-This is the weirdest part. I build a new release , it
gave me the same error!! May it be connection?

-So I copied the fresh release file to the WS Server
box , ran Remote Desktop and executed my just copied
release build. It ran fine!!!

-In frustration I copied the exe file from WS Server box
to my desktop and executed. It ran fine!!!!

-It is like kind of exe is blessed by the server machine.

I have no clue what is going on but I hope Microsoft will
help me. And may be this helps Microsoft solve that
problem too.
 
E

Emre Aydinceren

I found another workaround. I went to Framework Wizard
and adjusted security level to "Full Trust" for Local
Intratnet. But I am afraid how is it going to work for
customer when I release the code. They will be acccessing
my application through ther Internet not intranet and I
can not ask anyone to grant Full Trust to "Internet Zone".

MS Still waiting for help!!

Emre Aydinceren
 
Y

Yan-Hong Huang[MSFT]

Hello Emre,

I am looking up somebody who could help you on it. Thanks.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!Content-Class: urn:content-classes:message
!From: "Emre Aydinceren" <[email protected]>
!Sender: "Emre Aydinceren" <[email protected]>
!References: <[email protected]>
!Subject: The underlying connection was closed: An unexpected error occurred on a send.
!Date: Thu, 24 Jul 2003 12:34:25 -0700
!Lines: 75
!Message-ID: <[email protected]>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Thread-Index: AcNSGpdG8sJomDQJTvqhn1C4uSsMoQ==
!Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
!Path: cpmsftngxa06.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.webservices:18450
!NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
!
!
!
!I found another workaround. I went to Framework Wizard
!and adjusted security level to "Full Trust" for Local
!Intratnet. But I am afraid how is it going to work for
!customer when I release the code. They will be acccessing
!my application through ther Internet not intranet and I
!can not ask anyone to grant Full Trust to "Internet Zone".
!
!MS Still waiting for help!!
!
!Emre Aydinceren
!
!>-----Original Message-----
!>
!>As 90% WS developers I am frustrated by this problem:
!>
!>"An unhandled exception of
!type 'System.Net.WebException'
!>occurred in system.web.services.dll
!>
!>Additional information: The underlying connection was
!>closed: An unexpected error occurred on a send."
!>
!>I found a work around but Microsoft need to help me
!>identify the problem. And really need help.
!>
!>Listen to this:
!>
!>My Web Service box is a XP Pro Machine under the same
!>domain as I my development machine.
!>
!>-Before I left the office I compiled a build and my
!>client (WS consumer worked fine). I published the .exe
!>file so other people in the organization may take a look
!>at it.
!>
!>-I arrived at home. VPNed in (Nortel) . I fired the
!>visual studio and clicked run at debug mode.
!>I get this problem above. There has been no changes in
!>the source code at all!
!>
!>-I went to the web site and downloaded my last published
!>build. It ran fine!
!>
!>-In frustration I ran the exe file from project's
!release
!>folder manually. Since my compilation at home onlu
!>effected debug folder release folder was untouched. It
!>ran fine!!
!>
!>-This is the weirdest part. I build a new release , it
!>gave me the same error!! May it be connection?
!>
!>-So I copied the fresh release file to the WS Server
!>box , ran Remote Desktop and executed my just copied
!>release build. It ran fine!!!
!>
!>-In frustration I copied the exe file from WS Server box
!>to my desktop and executed. It ran fine!!!!
!>
!>-It is like kind of exe is blessed by the server machine.
!>
!>I have no clue what is going on but I hope Microsoft
!will
!>help me. And may be this helps Microsoft solve that
!>problem too.
!>
!>
!>
!>
!>
!>
!>.
!>
!
 
R

Rich Thurman [MS]

Hi Emre,

I understand that you are getting the following exception when you run your
client to the web service:

"An unhandled exception of type 'System.Net.WebException' occurred in
system.web.services.dll

Additional information: The underlying connection was closed: An
unexpected error occurred on a send."

What version of the framework are we dealing with here? And can you give
me the exact steps: Step1, Step2. Step3 etc to reproduce the same behavior?

Typically, you get this error when the connection is closed, which can be
caused at the client, firewall, or server. To get arround this we suggest
setting the httpkeepalive to false, for example:

C#

protected override WebRequest GetWebRequest(Uri uri)
{
HttpWebRequest webRequest = (HttpWebRequest) base.GetWebRequest(uri);

webRequest.KeepAlive = false;

return webRequest;
}

VB.NET

Protected Overrides Function GetWebRequest(ByVal uri As Uri) As
System.Net.WebRequest
Dim webRequest As System.Net.HttpWebRequest
webRequest = CType(MyBase.GetWebRequest(uri),
System.Net.HttpWebRequest)
webRequest.KeepAlive = False
GetWebRequest = webRequest
End Function

This would be added in the Reference.cs or Reference.vb.

Going back to your original post, I would like you to provide step by step
instructions so I am sure I clearly understand each step and the behavior
seen at each step.


Thank you, Rich Thurman
This posting is provided "AS IS", with no warranties, and confers no rights.
 
E

Emre Aydinceren

As I am close to alpha release, unfortunately I can not
pay any time to the incident. But during tests , next
week, I will be able to reply your message with detailed
steps since it is very possible that issue is outstanding
for us.

Regards

Emre Aydinceren
-----Original Message-----
Hi Emre,

I understand that you are getting the following exception when you run your
client to the web service:

"An unhandled exception of
type 'System.Net.WebException' occurred in
 

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,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top