System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine

7,124 views
Skip to first unread message

jesdial

unread,
Feb 18, 2007, 7:04:24 PM2/18/07
to Google Data API
Hello all

I'm recieving this error when executing

AtomFeed calFeed = service.Query(query);

(you can see entire code at:
http://groups.google.com/group/google-help-dataapi/browse_thread/thread/cd10501583c15eda)

The complete error is:

System.Net.WebException: The underlying connection was closed: An
unexpected error occurred on a send. ---> System.IO.IOException:
Unable to write data to the transport connection: An established
connection was aborted by the software in your host machine. --->
System.Net.Sockets.SocketException: An established connection was
aborted by the software in your host machine

But... that really is surprising is that, this problem occurs in one
PC/Network (at home..) but not in another (at work).

Where can i begin to look for?

Thank you in advance

Jesús de Diego

Frank Mantek

unread,
Feb 20, 2007, 11:03:19 AM2/20/07
to google-he...@googlegroups.com
That's most likely due to some underlying proxy system closing your connection.

There are a couple of ways to deal with this, one of them is outlined in:

http://code.google.com/p/google-gdata/wiki/KeepAliveAndUnderlyingConnectionIsClosed

Frank Mantek
Google

jesdial

unread,
Mar 1, 2007, 5:58:02 PM3/1/07
to Google Data API
Hello Frank

Excuse for the delay....
And ...
the solution didn't work...

mmmm....

Jesús de Diego

On 20 feb, 17:03, "Frank Mantek" <fman...@gmail.com> wrote:
> That's most likely due to some underlying proxy system closing your

> co'nnection.


>
> There are a couple of ways to deal with this, one of them is outlined in:
>

> http://code.google.com/p/google-gdata/wiki/KeepAliveAndUnderlyingConn...
>
> Frank Mantek
> Google


>
> On 2/18/07, jesdial <jesd...@gmail.com> wrote:
>
>
>
> > Hello all
>
> > I'm recieving this error when executing
>
> > AtomFeed calFeed = service.Query(query);
>
> > (you can see entire code at:
>

> >http://groups.google.com/group/google-help-dataapi/browse_thread/thre...

Frank Mantek

unread,
Mar 1, 2007, 7:19:58 PM3/1/07
to google-he...@googlegroups.com
What environment are you running in? Because, given all research that i have done, this is either the issue described/addressed in .NET 2.0, or you really have a proxy that cut's you off without telling anyone....

Frank Mantek
Google

jesdial

unread,
Mar 2, 2007, 5:40:37 AM3/2/07
to Google Data API
Hello Frank

First of all, thank you for your support.
I'm working with:
VS 2005
and Net Framework 2

I publish the web service at:
www.my3dgis.com/Service.asmx

GeoAgenda method obtain the calendar for input user and add an X,Y
new XML tag where possible... (it's configured for spanish users, so
web service will look for "Donde: " literal to obtain postal address.

Thank you in advance

Jesús de Diego

On Mar 2, 1:19 am, "Frank Mantek" <fman...@gmail.com> wrote:
> What environment are you running in? Because, given all research that i have
> done, this is either the issue described/addressed in .NET 2.0, or you
> really have a proxy that cut's you off without telling anyone....
>
> Frank Mantek
> Google
>

Frank Mantek

unread,
Mar 4, 2007, 3:21:24 AM3/4/07
to google-he...@googlegroups.com
If this problem occurs at your home network, but not your work network, is there a chance that your home ISP is doing something really weird? Because closing down (per wiki) the keep alive connection HAS to eliminate the problem. You can only get the error "unexpected close of connection" if the connection was kept alive in the first place...

Frank Mantek
Google

jesdial

unread,
Mar 5, 2007, 5:42:28 AM3/5/07
to Google Data API
Hello Frank

Yes, i think my ISP is playing with me.... but i don't know where i
can look for a solution....

However, i published the Web Service at:

http://www.my3dgis.com/SWP1/

and now i'm recieving:
System.Web.Services.Protocols.SoapException: Server was unable to
process request. ---> System.Security.SecurityException: That assembly
does not allow partially trusted callers.

I've added [assembly:AllowPartiallyTrustedCallers]
but the problem continued...

Jesús de Diego

On 4 mar, 09:21, "Frank Mantek" <fman...@gmail.com> wrote:
> If this problem occurs at your home network, but not your work network, is
> there a chance that your home ISP is doing something really weird? Because
> closing down (per wiki) the keep alive connection HAS to eliminate the
> problem. You can only get the error "unexpected close of connection" if the
> connection was kept alive in the first place...
>
> Frank Mantek
> Google

Frank Mantek

unread,
Mar 5, 2007, 6:25:05 AM3/5/07
to google-he...@googlegroups.com
You added this to what assembly? I assume that the error happens when you are in fact calling the GData .NET libs? So you would need to add that attribute to those libraries...

.NET security is a tricky pony, and very hard for me to diagnose (there are a lot of things you can do wrong in setting up a service and it's security....) - I am happy to try to help, but this looks in general to be something between you and your hosting service? Or is there anything i could do for the .NET release to make this more straighforward?

Frank Mantek
Google

jesdial

unread,
Mar 6, 2007, 8:19:59 AM3/6/07
to Google Data API
Hello Frank

I added AllowPartiallyTrustedCallers to my Web Service assembly.
However as it uses System.IO, or System.Net (for example), and other
dependencies from Google Calendar API... i should put all this code in
a separate assembly, mark it with full trust...
and the really problem......ask my hosting to leave this "hole" in
their servers...isn't it? (really i'm an absolute beginer with ASP.Net
and security polices so i don't know it this is true, false or
null.....).

Thank you any way.

What i really want to do is to add and X,Y tag with geographic
position to Google Calendar data... and load it in a GMap Control....I
thought a Web Service doing this will be a good solution, so i can
call the web service from simply JavaScript passing google
credentials...... but now... i'll need to think it again..

Thank you again

Jesús de DIego

On 5 mar, 12:25, "Frank Mantek" <fman...@gmail.com> wrote:
> You added this to what assembly? I assume that the error happens when you
> are in fact calling the GData .NET libs? So you would need to add that
> attribute to those libraries...
>
> .NET security is a tricky pony, and very hard for me to diagnose (there are
> a lot of things you can do wrong in setting up a service and it's
> security....) - I am happy to try to help, but this looks in general to be
> something between you and your hosting service? Or is there anything i could
> do for the .NET release to make this more straighforward?
>
> Frank Mantek
> Google

Frank Mantek

unread,
Mar 6, 2007, 9:31:08 AM3/6/07
to google-he...@googlegroups.com
I think what is missing is that you add AllowPartiallyTrustedCallers to the GoogleGdata dlls. I don't think that is in there by default, and it would just require a recompile. I have that on my ToDo to add for the next release... (just forgot about it...).

And, no, you should not add full trust things to your hosting service, they will not be happy...

Frank Mantek
Google
Reply all
Reply to author
Forward
0 new messages