Problem accessing WebService through Proxy Server

  • Thread starter Dermot O'Loughlin
  • Start date
D

Dermot O'Loughlin

I get the following error when trying to access a Webservice through
my proxy server. I know that the authentication credentials are
correct because if i use an incorrect username I get a message saying
that i can't be authenticated. I can't understand why I get a timeout.

Any help much appreciated.


System.Net.WebException: The request failed with HTTP status 504:
Proxy Timeout ( Connection timed out. For more information about this
event, see ISA Server Help. ).
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean
asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at b2m.B2M_MessageSenderService.login(String account, String
login4, String password) in c:\documents and settings\doloughlin\my
documents\visual studio
projects\sms\b2mlibrary\b2m_messagesenderservice.cs:line 191
at SendSMS.SendSMSService.SendSMS(String numbers, String message)
in c:\inetpub\wwwroot\sendsms\sendsmsservice.asmx.cs:line 87
 
D

Dan Rogers

Hi Dermot,

Without seeing the code you are using to set up the web service proxy's
HTTP connection's proxy server setting, it's hard to say what's what. In
general, however code such as the following will be something to consider
if you aren't already there...

myproxy.v1 serviceProxy = new myproxy.v1();
serviceProxy.Proxy = new System.Net.WebProxy("proxyURL", true);

There are several overloads to the WebProxy constuctor.

The first line represents instantiation of my web service proxy that I
generated by adding a web reference to my project.
The second line represents setting the HTTP proxy settings for the proxy
server. I used a two argument flavor that would make the call with the
current user credentials, and let me specify the URI for the proxy server,
and to bypass the proxy server for resolving local intranet requests.
There are also overloads that let you explicitely pass a credential object
that you would have to create yourself at runtime).

I hope this helps

Dan Rogers
Microsoft Corporation


--------------------
From: (e-mail address removed) (Dermot O'Loughlin)
Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
Subject: Problem accessing WebService through Proxy Server
Date: 1 Dec 2004 09:31:11 -0800
Organization: http://groups.google.com
Lines: 22
Message-ID: <[email protected]>
NNTP-Posting-Host: 83.70.155.58
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1101922272 24798 127.0.0.1 (1 Dec 2004 17:31:12 GMT)
X-Complaints-To: (e-mail address removed)
NNTP-Posting-Date: Wed, 1 Dec 2004 17:31:12 +0000 (UTC)
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08
phx.gbl!news-out.cwix.com!newsfeed.cwix.com!prodigy.com!news.glorb.com!post
news.google.com!not-for-mail
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet.webservices:26940
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices

I get the following error when trying to access a Webservice through
my proxy server. I know that the authentication credentials are
correct because if i use an incorrect username I get a message saying
that i can't be authenticated. I can't understand why I get a timeout.

Any help much appreciated.


System.Net.WebException: The request failed with HTTP status 504:
Proxy Timeout ( Connection timed out. For more information about this
event, see ISA Server Help. ).
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClient
Message
message, WebResponse response, Stream responseStream, Boolean
asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at b2m.B2M_MessageSenderService.login(String account, String
login4, String password) in c:\documents and settings\doloughlin\my
documents\visual studio
projects\sms\b2mlibrary\b2m_messagesenderservice.cs:line 191
at SendSMS.SendSMSService.SendSMS(String numbers, String message)
in c:\inetpub\wwwroot\sendsms\sendsmsservice.asmx.cs:line 87
 
D

dermot_o_loughlin

Dan,

here is the code I use:

System.Net.ICredentials credential = new System.Net.NetworkCredential(
ConfigurationSettings.AppSettings[Global.ProxyUsername],
ConfigurationSettings.AppSettings[Global.ProxyPassword],
ConfigurationSettings.AppSettings[Global.ProxyDomain]);

WebProxy myProxy=new
WebProxy(ConfigurationSettings.AppSettings[Global.ProxyServer],true,null,credential);


//assign proxy to webservice
b2m.Proxy = myProxy;

//call to webservice method
string auth =
b2m.login(ConfigurationSettings.AppSettings[Global.SMSAccount],
ConfigurationSettings.AppSettings

All proxy info is stored in a config file and is correct. For some
reason the call to the login method of the webservice fails giving a
proxy timeout error.

Any ideas?

Thanks,
Dermot.

Dan said:
Hi Dermot,

Without seeing the code you are using to set up the web service proxy's
HTTP connection's proxy server setting, it's hard to say what's what. In
general, however code such as the following will be something to consider
if you aren't already there...

myproxy.v1 serviceProxy = new myproxy.v1();
serviceProxy.Proxy = new System.Net.WebProxy("proxyURL", true);

There are several overloads to the WebProxy constuctor.

The first line represents instantiation of my web service proxy that I
generated by adding a web reference to my project.
The second line represents setting the HTTP proxy settings for the proxy
server. I used a two argument flavor that would make the call with the
current user credentials, and let me specify the URI for the proxy server,
and to bypass the proxy server for resolving local intranet requests.
There are also overloads that let you explicitely pass a credential object
that you would have to create yourself at runtime).

I hope this helps

Dan Rogers
Microsoft Corporation


--------------------
From: (e-mail address removed) (Dermot O'Loughlin)
Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
Subject: Problem accessing WebService through Proxy Server
Date: 1 Dec 2004 09:31:11 -0800
Organization: http://groups.google.com
Lines: 22
Message-ID: <[email protected]>
NNTP-Posting-Host: 83.70.155.58
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1101922272 24798 127.0.0.1 (1 Dec 2004 17:31:12 GMT)
X-Complaints-To: (e-mail address removed)
NNTP-Posting-Date: Wed, 1 Dec 2004 17:31:12 +0000 (UTC)
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08phx.gbl!news-out.cwix.com!newsfeed.cwix.com!prodigy.com!news.glorb.com!post
news.google.com!not-for-mail
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet.webservices:26940
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices

I get the following error when trying to access a Webservice through
my proxy server. I know that the authentication credentials are
correct because if i use an incorrect username I get a message saying
that i can't be authenticated. I can't understand why I get a timeout.

Any help much appreciated.


System.Net.WebException: The request failed with HTTP status 504:
Proxy Timeout ( Connection timed out. For more information about this
event, see ISA Server Help. ).
at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClient
Message
message, WebResponse response, Stream responseStream, Boolean
asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at b2m.B2M_MessageSenderService.login(String account, String
login4, String password) in c:\documents and settings\doloughlin\my
documents\visual studio
projects\sms\b2mlibrary\b2m_messagesenderservice.cs:line 191
at SendSMS.SendSMSService.SendSMS(String numbers, String message)
in c:\inetpub\wwwroot\sendsms\sendsmsservice.asmx.cs:line 87
 
D

dermot_o_loughlin

Dan,

here is the code I use:

WebProxy myProxy;
{
System.Net.ICredentials credential = new System.Net.NetworkCredential(
ConfigurationSettings.AppSettings[Global.ProxyUsername],
ConfigurationSettings.AppSettings[Global.ProxyPassword],
ConfigurationSettings.AppSettings[Global.ProxyDomain]);

myProxy=new
WebProxy(ConfigurationSettings.AppSettings[Global.ProxyServer],true,null,credential);


b2m.Proxy = myProxy;

// call to webservice
string auth =
b2m.login(ConfigurationSettings.AppSettings[Global.SMSAccount],
ConfigurationSettings.AppSettings

All proxy info is stored in a config file and is correct. For some
reason the call to the login method of the webservice fails giving a
proxy timeout error.

Any ideas?

Thanks,
Dermot.

Dan said:
Hi Dermot,

Without seeing the code you are using to set up the web service proxy's
HTTP connection's proxy server setting, it's hard to say what's what. In
general, however code such as the following will be something to consider
if you aren't already there...

myproxy.v1 serviceProxy = new myproxy.v1();
serviceProxy.Proxy = new System.Net.WebProxy("proxyURL", true);

There are several overloads to the WebProxy constuctor.

The first line represents instantiation of my web service proxy that I
generated by adding a web reference to my project.
The second line represents setting the HTTP proxy settings for the proxy
server. I used a two argument flavor that would make the call with the
current user credentials, and let me specify the URI for the proxy server,
and to bypass the proxy server for resolving local intranet requests.
There are also overloads that let you explicitely pass a credential object
that you would have to create yourself at runtime).

I hope this helps

Dan Rogers
Microsoft Corporation


--------------------
From: (e-mail address removed) (Dermot O'Loughlin)
Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
Subject: Problem accessing WebService through Proxy Server
Date: 1 Dec 2004 09:31:11 -0800
Organization: http://groups.google.com
Lines: 22
Message-ID: <[email protected]>
NNTP-Posting-Host: 83.70.155.58
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1101922272 24798 127.0.0.1 (1 Dec 2004 17:31:12 GMT)
X-Complaints-To: (e-mail address removed)
NNTP-Posting-Date: Wed, 1 Dec 2004 17:31:12 +0000 (UTC)
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08phx.gbl!news-out.cwix.com!newsfeed.cwix.com!prodigy.com!news.glorb.com!post
news.google.com!not-for-mail
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet.webservices:26940
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices

I get the following error when trying to access a Webservice through
my proxy server. I know that the authentication credentials are
correct because if i use an incorrect username I get a message saying
that i can't be authenticated. I can't understand why I get a timeout.

Any help much appreciated.


System.Net.WebException: The request failed with HTTP status 504:
Proxy Timeout ( Connection timed out. For more information about this
event, see ISA Server Help. ).
at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClient
Message
message, WebResponse response, Stream responseStream, Boolean
asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at b2m.B2M_MessageSenderService.login(String account, String
login4, String password) in c:\documents and settings\doloughlin\my
documents\visual studio
projects\sms\b2mlibrary\b2m_messagesenderservice.cs:line 191
at SendSMS.SendSMSService.SendSMS(String numbers, String message)
in c:\inetpub\wwwroot\sendsms\sendsmsservice.asmx.cs:line 87
 
D

Dan Rogers

Hi Dermott,

You might want to trace the calls and see what specifically is happening on
the timeout. Is it possible that the name of the proxy server isn't
resolving correctly?

Just some thoughts

Dan
--------------------
From: (e-mail address removed)
Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
Subject: Re: Problem accessing WebService through Proxy Server
Date: 2 Dec 2004 01:15:21 -0800
Organization: http://groups.google.com
Lines: 123
Message-ID: <[email protected]>
References: <[email protected]>
<SpfQ#0#[email protected]>
NNTP-Posting-Host: 83.70.155.58
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1101978925 21470 127.0.0.1 (2 Dec 2004 09:15:25 GMT)
X-Complaints-To: (e-mail address removed)
NNTP-Posting-Date: Thu, 2 Dec 2004 09:15:25 +0000 (UTC)
User-Agent: G2/0.2
Complaints-To: (e-mail address removed)
Injection-Info: z14g2000cwz.googlegroups.com; posting-host=83.70.155.58;
posting-account=vpdbngwAAACg0AqmYwjg7YXkEbGa-pJS
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado.fas
twebnet.it!tiscali!newsfeed1.ip.tiscali.net!proxad.net!216.239.36.134.MISMAT
CH!postnews.google.com!z14g2000cwz.googlegroups.com!not-for-mail
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet.webservices:26986
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices

Dan,

here is the code I use:

System.Net.ICredentials credential = new System.Net.NetworkCredential(
ConfigurationSettings.AppSettings[Global.ProxyUsername],
ConfigurationSettings.AppSettings[Global.ProxyPassword],
ConfigurationSettings.AppSettings[Global.ProxyDomain]);

WebProxy myProxy=new
WebProxy(ConfigurationSettings.AppSettings[Global.ProxyServer],true,null,cr edential);


//assign proxy to webservice
b2m.Proxy = myProxy;

//call to webservice method
string auth =
b2m.login(ConfigurationSettings.AppSettings[Global.SMSAccount],
ConfigurationSettings.AppSettings

All proxy info is stored in a config file and is correct. For some
reason the call to the login method of the webservice fails giving a
proxy timeout error.

Any ideas?

Thanks,
Dermot.

Dan said:
Hi Dermot,

Without seeing the code you are using to set up the web service proxy's
HTTP connection's proxy server setting, it's hard to say what's what. In
general, however code such as the following will be something to consider
if you aren't already there...

myproxy.v1 serviceProxy = new myproxy.v1();
serviceProxy.Proxy = new System.Net.WebProxy("proxyURL", true);

There are several overloads to the WebProxy constuctor.

The first line represents instantiation of my web service proxy that I
generated by adding a web reference to my project.
The second line represents setting the HTTP proxy settings for the proxy
server. I used a two argument flavor that would make the call with the
current user credentials, and let me specify the URI for the proxy server,
and to bypass the proxy server for resolving local intranet requests.
There are also overloads that let you explicitely pass a credential object
that you would have to create yourself at runtime).

I hope this helps

Dan Rogers
Microsoft Corporation


--------------------
From: (e-mail address removed) (Dermot O'Loughlin)
Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
Subject: Problem accessing WebService through Proxy Server
Date: 1 Dec 2004 09:31:11 -0800
Organization: http://groups.google.com
Lines: 22
Message-ID: <[email protected]>
NNTP-Posting-Host: 83.70.155.58
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1101922272 24798 127.0.0.1 (1 Dec 2004 17:31:12 GMT)
X-Complaints-To: (e-mail address removed)
NNTP-Posting-Date: Wed, 1 Dec 2004 17:31:12 +0000 (UTC)
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP0 8phx.gbl!news-out.cwix.com!newsfeed.cwix.com!prodigy.com!news.glorb.com!post
news.google.com!not-for-mail
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet.webservices:26940
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices

I get the following error when trying to access a Webservice through
my proxy server. I know that the authentication credentials are
correct because if i use an incorrect username I get a message saying
that i can't be authenticated. I can't understand why I get a timeout.

Any help much appreciated.


System.Net.WebException: The request failed with HTTP status 504:
Proxy Timeout ( Connection timed out. For more information about this
event, see ISA Server Help. ).
at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClien t
Message
message, WebResponse response, Stream responseStream, Boolean
asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at b2m.B2M_MessageSenderService.login(String account, String
login4, String password) in c:\documents and settings\doloughlin\my
documents\visual studio
projects\sms\b2mlibrary\b2m_messagesenderservice.cs:line 191
at SendSMS.SendSMSService.SendSMS(String numbers, String message)
in c:\inetpub\wwwroot\sendsms\sendsmsservice.asmx.cs:line 87
 

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,767
Messages
2,569,573
Members
45,046
Latest member
Gavizuho

Latest Threads

Top