473,396 Members | 2,158 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,396 software developers and data experts.

Proxy Authentication Required using VS2005

rcp
Hi all,
I've read all posts from all existing threads and none of them worked
to solve my problem, although its exactly the same. I'll try to
explain my case and see if a kind soul could help me out:

I've a win32 service in C# on a client machine A, which accesses a WS
(C#) on a server machine B (hosted on an IIS)

Case 1:
If I try to add the WSDL for the WS through VS2005, the 'Discovery
Credentials for proxy server' pops up, and whatever user and pwd with
rights to get through is not working.

error:
-------------
There was an error downloading 'http://xxxx'.
Unable to connect to the remote server
-------------

Case 2:
I try to add the WSDL for the WS through WSDL.EXE, using proxy
user-password-domain on the command prompt, but I get the following
error.

wsdl /l:cs /n:ContentHost2/proxy:nnn.nnn.nnn.nnn:8080
/proxydomain:xxx.xx /proxypassword:aaaaaaa /proxyuse
rname:bbbbbb /o:d:\
http://aaa.bbb.ccc.ddd:8080/WebPorta...ices/WebServic
e1.asmx?wsdl

error:
-----------------
Error: There was an error processing
'http://aaa.bbb.ccc.ddd:8080/WebPortal/WebSer
vices/WebService1.asmx?wsdl'.
- There was an error downloading
'http://aaa.bbb.ccc.ddd:8080/WebPortal/WebServi
ces/WebService1.asmx?wsdl'.
- The request failed with HTTP status 407: Proxy Authentication
Required.

Case 3:
I use the WS created on my development machine (with its own IIS),
adding the WSDL as a web reference through VS2005.
It works.
On the win32 service config file, I configure it to use the service
hosted on Machine B (the one outside my domain, and needing a proxy to
get out.
I debug the service.
It instantiates the WS with no problem on a global variable, reading
the WS URL from the config file.
Also, a WebProxy with my credentials is created with username, pwd,
domain and proxyurl.

----CODE-----
....
if (settings.Credentials != null)
{

WebProxy proxy = new
WebProxy(settings.Credentials.Address, settings.Credentials.Port);
if (string.IsNullOrEmpty(settings.Credentials.Domain) )
{
proxy.Credentials = new
NetworkCredential(settings.Credentials.User,
settings.Credentials.Password); //, settings.Credentials.Domain);
} else {
proxy.Credentials = new
NetworkCredential(settings.Credentials.User,
settings.Credentials.Password, settings.Credentials.Domain);
}

wsContentClient.Proxy = proxy;

}
....

----END CODE----

When I try to invoke a method, I get the same 407 error:

-------Error-------
The request failed with HTTP status 407: Proxy Authentication Required.
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean
asyncCall)
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
at
Indra.Cms.Tools.EgnosAlerts.ContentHost.WsContentC lient.InsertRepositoryObject(String
repositoryName, String objXml) in
D:\Egnos\Indra.Cms\Tools\Indra.Cms.Tools.EgnosAler ts\Web
References\ContentHost\Reference.cs:line 143
at
Indra.Cms.Tools.EgnosAlerts.EgnosAlertsProcessor.P ublishAlert(MailMessage
msg) in
D:\Egnos\Indra.Cms\Tools\Indra.Cms.Tools.EgnosAler ts\EgnosAlertsProcessor.cs:line
149
at
Indra.Cms.Tools.EgnosAlerts.EgnosAlertsProcessor.P rocessMessages(Int32
max) in
D:\Egnos\Indra.Cms\Tools\Indra.Cms.Tools.EgnosAler ts\EgnosAlertsProcessor.cs:line
83
---------------------
Now. Does enyone know why this is happening?

TIA.

rcp.

Aug 18 '06 #1
2 11366
have you tried adding wsContentClient.PreAuthenticate = true; ?

Mike
http://www.seeknsnatch.com

"rcp" <ri******************@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
Hi all,
I've read all posts from all existing threads and none of them worked
to solve my problem, although its exactly the same. I'll try to
explain my case and see if a kind soul could help me out:

I've a win32 service in C# on a client machine A, which accesses a WS
(C#) on a server machine B (hosted on an IIS)

Case 1:
If I try to add the WSDL for the WS through VS2005, the 'Discovery
Credentials for proxy server' pops up, and whatever user and pwd with
rights to get through is not working.

error:
-------------
There was an error downloading 'http://xxxx'.
Unable to connect to the remote server
-------------

Case 2:
I try to add the WSDL for the WS through WSDL.EXE, using proxy
user-password-domain on the command prompt, but I get the following
error.

wsdl /l:cs /n:ContentHost2/proxy:nnn.nnn.nnn.nnn:8080
/proxydomain:xxx.xx /proxypassword:aaaaaaa /proxyuse
rname:bbbbbb /o:d:\
http://aaa.bbb.ccc.ddd:8080/WebPorta...ices/WebServic
e1.asmx?wsdl

error:
-----------------
Error: There was an error processing
'http://aaa.bbb.ccc.ddd:8080/WebPortal/WebSer
vices/WebService1.asmx?wsdl'.
- There was an error downloading
'http://aaa.bbb.ccc.ddd:8080/WebPortal/WebServi
ces/WebService1.asmx?wsdl'.
- The request failed with HTTP status 407: Proxy Authentication
Required.

Case 3:
I use the WS created on my development machine (with its own IIS),
adding the WSDL as a web reference through VS2005.
It works.
On the win32 service config file, I configure it to use the service
hosted on Machine B (the one outside my domain, and needing a proxy to
get out.
I debug the service.
It instantiates the WS with no problem on a global variable, reading
the WS URL from the config file.
Also, a WebProxy with my credentials is created with username, pwd,
domain and proxyurl.

----CODE-----
...
if (settings.Credentials != null)
{

WebProxy proxy = new
WebProxy(settings.Credentials.Address, settings.Credentials.Port);
if (string.IsNullOrEmpty(settings.Credentials.Domain) )
{
proxy.Credentials = new
NetworkCredential(settings.Credentials.User,
settings.Credentials.Password); //, settings.Credentials.Domain);
} else {
proxy.Credentials = new
NetworkCredential(settings.Credentials.User,
settings.Credentials.Password, settings.Credentials.Domain);
}

wsContentClient.Proxy = proxy;

}
...

----END CODE----

When I try to invoke a method, I get the same 407 error:

-------Error-------
The request failed with HTTP status 407: Proxy Authentication Required.
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean
asyncCall)
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
at
Indra.Cms.Tools.EgnosAlerts.ContentHost.WsContentC lient.InsertRepositoryObject(String
repositoryName, String objXml) in
D:\Egnos\Indra.Cms\Tools\Indra.Cms.Tools.EgnosAler ts\Web
References\ContentHost\Reference.cs:line 143
at
Indra.Cms.Tools.EgnosAlerts.EgnosAlertsProcessor.P ublishAlert(MailMessage
msg) in
D:\Egnos\Indra.Cms\Tools\Indra.Cms.Tools.EgnosAler ts\EgnosAlertsProcessor.cs:line
149
at
Indra.Cms.Tools.EgnosAlerts.EgnosAlertsProcessor.P rocessMessages(Int32
max) in
D:\Egnos\Indra.Cms\Tools\Indra.Cms.Tools.EgnosAler ts\EgnosAlertsProcessor.cs:line
83
---------------------
Now. Does enyone know why this is happening?

TIA.

rcp.

Aug 18 '06 #2
rcp
I've tried...and still the same error.
Also I have the problem if I try to listen any machine outside my
domain. That is, I also have to listen on an IMAP server outside the
application domain, thus it has to go through the proxy. At least it's
what I assume since I get the same error when trying to connect to it
(I'm using StableBeast IMAP Library for this other one)

Any other ideas?
TIA.
R.

Michael ha escrito:
have you tried adding wsContentClient.PreAuthenticate = true; ?

Mike
http://www.seeknsnatch.com

"rcp" <ri******************@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
Hi all,
I've read all posts from all existing threads and none of them worked
to solve my problem, although its exactly the same. I'll try to
explain my case and see if a kind soul could help me out:

I've a win32 service in C# on a client machine A, which accesses a WS
(C#) on a server machine B (hosted on an IIS)

Case 1:
If I try to add the WSDL for the WS through VS2005, the 'Discovery
Credentials for proxy server' pops up, and whatever user and pwd with
rights to get through is not working.

error:
-------------
There was an error downloading 'http://xxxx'.
Unable to connect to the remote server
-------------

Case 2:
I try to add the WSDL for the WS through WSDL.EXE, using proxy
user-password-domain on the command prompt, but I get the following
error.

wsdl /l:cs /n:ContentHost2/proxy:nnn.nnn.nnn.nnn:8080
/proxydomain:xxx.xx /proxypassword:aaaaaaa /proxyuse
rname:bbbbbb /o:d:\
http://aaa.bbb.ccc.ddd:8080/WebPorta...ices/WebServic
e1.asmx?wsdl

error:
-----------------
Error: There was an error processing
'http://aaa.bbb.ccc.ddd:8080/WebPortal/WebSer
vices/WebService1.asmx?wsdl'.
- There was an error downloading
'http://aaa.bbb.ccc.ddd:8080/WebPortal/WebServi
ces/WebService1.asmx?wsdl'.
- The request failed with HTTP status 407: Proxy Authentication
Required.

Case 3:
I use the WS created on my development machine (with its own IIS),
adding the WSDL as a web reference through VS2005.
It works.
On the win32 service config file, I configure it to use the service
hosted on Machine B (the one outside my domain, and needing a proxy to
get out.
I debug the service.
It instantiates the WS with no problem on a global variable, reading
the WS URL from the config file.
Also, a WebProxy with my credentials is created with username, pwd,
domain and proxyurl.

----CODE-----
...
if (settings.Credentials != null)
{

WebProxy proxy = new
WebProxy(settings.Credentials.Address, settings.Credentials.Port);
if (string.IsNullOrEmpty(settings.Credentials.Domain) )
{
proxy.Credentials = new
NetworkCredential(settings.Credentials.User,
settings.Credentials.Password); //, settings.Credentials.Domain);
} else {
proxy.Credentials = new
NetworkCredential(settings.Credentials.User,
settings.Credentials.Password, settings.Credentials.Domain);
}

wsContentClient.Proxy = proxy;

}
...

----END CODE----

When I try to invoke a method, I get the same 407 error:

-------Error-------
The request failed with HTTP status 407: Proxy Authentication Required.
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean
asyncCall)
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
at
Indra.Cms.Tools.EgnosAlerts.ContentHost.WsContentC lient.InsertRepositoryObject(String
repositoryName, String objXml) in
D:\Egnos\Indra.Cms\Tools\Indra.Cms.Tools.EgnosAler ts\Web
References\ContentHost\Reference.cs:line 143
at
Indra.Cms.Tools.EgnosAlerts.EgnosAlertsProcessor.P ublishAlert(MailMessage
msg) in
D:\Egnos\Indra.Cms\Tools\Indra.Cms.Tools.EgnosAler ts\EgnosAlertsProcessor.cs:line
149
at
Indra.Cms.Tools.EgnosAlerts.EgnosAlertsProcessor.P rocessMessages(Int32
max) in
D:\Egnos\Indra.Cms\Tools\Indra.Cms.Tools.EgnosAler ts\EgnosAlertsProcessor.cs:line
83
---------------------
Now. Does enyone know why this is happening?

TIA.

rcp.
Aug 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mark Ferguson | last post by:
I've been trying to get a simple pycurl script working with an authenticating proxy, here is the code (with changes to protect the guilty!): from pycurl import * import StringIO b =...
3
by: Wild Wind | last post by:
Hello all, I apologise in advance for the long windedness of this post, but I feel that if I am going to get any solution to this problem, it is important that I present as much information...
0
by: J Ames | last post by:
Please, if this is the incorrect forum for this question, let me know which forum is most appropriate. I want to make sure I get visibility with the proper gurus! I have a .NET console app that...
4
by: Boni | last post by:
I want consuming a webserivce trough a proxy. I use this code. myService s = new myService (); System.Net.WebProxy proxyObject = new System.Net.WebProxy("http://proxyhost:8080"); s.Proxy =...
7
by: chandru1782 | last post by:
Dear friends, I am trying to use CPAN for installing some perl modules. i am using a ubuntu system, which has internet connection through lan and authenticated proxy. when trying to install...
3
by: Learning.Net | last post by:
Hi All, I have an windows application created in C# &it is running fine on several of our customer. It does a httpWebrequest in the background. Everything was working fine but some customer are...
2
by: =?Utf-8?B?TGVuc3Rlcg==?= | last post by:
A C# (.NET 2) application which uses the System.Net.HttpWebRequest object to request a resource over HTTPS is failing following the installation of a new proxy server on our internal network with...
5
by: =?Utf-8?B?TWFyaw==?= | last post by:
I'm researching what is the best way to create a generic WCF proxy wrapper that has the following requirements: 1. Remove the System.ServiceModel config section requirement for clients. We have...
2
by: krishnakrish | last post by:
Hi, My name is krishna. I am using asp.net 2.0 with C#. I amusing Windows XP professional as OS. When I post some data to an external web server I get the error as "The Remote server returned an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.