Home All Groups Group Topic Archive Search About
Author
26 Nov 2005 12:40 AM
Kevin
Hi,

Hope someone can help us with this problem.  This is our first endeavour
into .NET 2.0 :-)

BACKGROUD INFO:
----------------------
We've built a website using .NET 2.0 and deployed onto our webserver. This
webpage simply calls some web services (built with .NET 1.1) running on the
same web server. The webservice executes SQL transactions to a SQL Server
which sits behind our company firewall.

PROBLEM:
----------------------
Everytime a form is submitted (a web service call happens here), it's trying
to connect to a proxy server which no longer exist!! This was verified by our
network team. (Please see below for error message and stack trace).


OTHER NOTES:
------------------
Numerous pages have been built using .NET 1.1 running on the same webserver
and we've never encountered this problem.

TESTING DONE:
-------------------
To test that it's not something wrong with the webservice, we've built a
simple web page using .NET 1.1 which calls the same webservice, depoyed it
onto the webserver, a request was made, and it was successful.

We've also ran this website in question from a internal webserver, and did
not encounter this problem.

QUESTIONS:
-------------------
1)Is there any differences in the way a ASP.NET page built on .NET 2.0 and
..NET 1.1 makes it's call to a webservice??

2)Where is the ASP page picking up this proxy settings from? ASPNET account??

3)Is there a way to overcome this proxy problem from our ASP.NET code?

Many Thanks,
Kevin

*********************************************************
ERROR MESSAGE:

"A connection attempt failed because the connected party did not properly
respond after a period of time, or established connection failed because
connected host has failed to respond "

STACK TRACE:

"[SocketException (0x274c): A connection attempt failed because the
connected party did not properly respond after a period of time, or
established connection failed because connected host has failed to respond]
   System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot,
SocketAddress socketAddress) +1002130
   System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +33
   System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure,
Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState
state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +431

[WebException: Unable to connect to the remote server]
   System.Net.HttpWebRequest.GetRequestStream() +1504509
   System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) +103
   CustomerService.CustomerService.ValidateLogin(String dbID, String login,
String passwd, String appln, DataSet& dsRole, DataSet& dsOperator) +95
   _Default.Login1_Authenticate(Object sender, AuthenticateEventArgs e) +147
   System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e)
+106
   System.Web.UI.WebControls.Login.AttemptLogin() +105
   System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e)
+99
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
   System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
+163

System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
"

Author
27 Nov 2005 8:41 AM
Rick Strahl [MVP]
Hi Kevin,

The default proxy settings in .NET 2.0 are a bit different than in 1.x. By
default .NET 2.0 uses the default proxy which is using the IE settings
installed in the registry. Since ASP.NET by default doesn't have access to
those keys it ends up searching around for the proxy settings and fails
which is what's very slow.

Alternately it might be that your app is impersonating and indeed HAS access
to the default proxy settings which are now obsolete. If that's the case
just fire up IE on the server and try to clear the proxy settings.

I reported this a while back but I'm not sure whether this was changed for
release or not. You can add a few settings to web.config to not use Proxy
settings of the machine.

Take a look at this post which talks about this:

http://west-wind.com/weblog/posts/2542.aspx

In the comments there's the web.config settings that worked for me during
the beta. I haven't taken them out, to double check whether it works without
them, but I know those settings worked for me.


+++ Rick ---

--

Rick Strahl
West Wind Technologies
www.west-wind.com
www.west-wind.com/weblog


Show quoteHide quote
"Kevin" <Ke***@discussions.microsoft.com> wrote in message
news:2D0D6757-8B79-4787-999D-324196AD2700@microsoft.com...
> Hi,
>
> Hope someone can help us with this problem.  This is our first endeavour
> into .NET 2.0 :-)
>
> BACKGROUD INFO:
> ----------------------
> We've built a website using .NET 2.0 and deployed onto our webserver. This
> webpage simply calls some web services (built with .NET 1.1) running on
> the
> same web server. The webservice executes SQL transactions to a SQL Server
> which sits behind our company firewall.
>
> PROBLEM:
> ----------------------
> Everytime a form is submitted (a web service call happens here), it's
> trying
> to connect to a proxy server which no longer exist!! This was verified by
> our
> network team. (Please see below for error message and stack trace).
>
>
> OTHER NOTES:
> ------------------
> Numerous pages have been built using .NET 1.1 running on the same
> webserver
> and we've never encountered this problem.
>
> TESTING DONE:
> -------------------
> To test that it's not something wrong with the webservice, we've built a
> simple web page using .NET 1.1 which calls the same webservice, depoyed it
> onto the webserver, a request was made, and it was successful.
>
> We've also ran this website in question from a internal webserver, and did
> not encounter this problem.
>
> QUESTIONS:
> -------------------
> 1)Is there any differences in the way a ASP.NET page built on .NET 2.0 and
> .NET 1.1 makes it's call to a webservice??
>
> 2)Where is the ASP page picking up this proxy settings from? ASPNET
> account??
>
> 3)Is there a way to overcome this proxy problem from our ASP.NET code?
>
> Many Thanks,
> Kevin
>
> *********************************************************
> ERROR MESSAGE:
>
> "A connection attempt failed because the connected party did not properly
> respond after a period of time, or established connection failed because
> connected host has failed to respond "
>
> STACK TRACE:
>
> "[SocketException (0x274c): A connection attempt failed because the
> connected party did not properly respond after a period of time, or
> established connection failed because connected host has failed to
> respond]
>   System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot,
> SocketAddress socketAddress) +1002130
>   System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +33
>   System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure,
> Socket s4, Socket s6, Socket& socket, IPAddress& address,
> ConnectSocketState
> state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +431
>
> [WebException: Unable to connect to the remote server]
>   System.Net.HttpWebRequest.GetRequestStream() +1504509
>   System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
> methodName, Object[] parameters) +103
>   CustomerService.CustomerService.ValidateLogin(String dbID, String login,
> String passwd, String appln, DataSet& dsRole, DataSet& dsOperator) +95
>   _Default.Login1_Authenticate(Object sender, AuthenticateEventArgs e)
> +147
>   System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e)
> +106
>   System.Web.UI.WebControls.Login.AttemptLogin() +105
>   System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs
> e)
> +99
>   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
> +35
>   System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
>   System.Web.UI.WebControls.Button.RaisePostBackEvent(String
> eventArgument)
> +163
>
> System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
> eventArgument) +7
>   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
> sourceControl, String eventArgument) +11
>   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
>   System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
> "
>
>
>
>
Are all your drivers up to date? click for free checkup

Author
28 Nov 2005 2:56 AM
Kevin
Yes, I've added the following lines since I posted and everything works!!.....

<system.net>
<defaultProxy>
<proxy usesystemdefault="false"/>
</defaultProxy>
</system.net>

This was on a release version of .NET 2.0. It's a bit annoying really.......



Show quoteHide quote
"Rick Strahl [MVP]" wrote:

> Hi Kevin,
>
> The default proxy settings in .NET 2.0 are a bit different than in 1.x. By
> default .NET 2.0 uses the default proxy which is using the IE settings
> installed in the registry. Since ASP.NET by default doesn't have access to
> those keys it ends up searching around for the proxy settings and fails
> which is what's very slow.
>
> Alternately it might be that your app is impersonating and indeed HAS access
> to the default proxy settings which are now obsolete. If that's the case
> just fire up IE on the server and try to clear the proxy settings.
>
> I reported this a while back but I'm not sure whether this was changed for
> release or not. You can add a few settings to web.config to not use Proxy
> settings of the machine.
>
> Take a look at this post which talks about this:
>
> http://west-wind.com/weblog/posts/2542.aspx
>
> In the comments there's the web.config settings that worked for me during
> the beta. I haven't taken them out, to double check whether it works without
> them, but I know those settings worked for me.
>
>
> +++ Rick ---
>
> --
>
> Rick Strahl
> West Wind Technologies
> www.west-wind.com
> www.west-wind.com/weblog
>
>

Bookmark and Share