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

Proxy Connection Web Services

Hello,

I am writing a c# application which connects to web services through a
Proxy Server. I am running a local Proxy Host to simulate what the
user is seeing, and his problem is he is getting a 407 error, Proxy
Authentication Required. I am applying the credentials and I realize I

am probably just missing something. Here is my code, do I need any
modifications on the Web Service?
WebService service = new WebService();
WebProxy proxy = new WebProxy(this.txtProxyHost.Text,
int.Parse(this.txtPort.Text));
proxy.BypassProxyOnLocal = true;
NetworkCredential cred = new NetworkCredential(this.txtUserName.Text,
this.txtPassword.Text,
this.txtDomain.Text);
proxy.Credentials = cred;
service .Timeout = 20000;
service .Proxy = proxy;
WebRequest req = WebRequest.Create(service .Url);
req.Proxy = proxy;
******************
Me again, the last two lines I am unsure about, but do I need to do
anything special when accessing the Web Method?
I saw something about Proxy-Authentication which may be an issue, but
again, not sure if applicable here.
Thank you in advance.!

Nov 21 '06 #1
1 1694
I am not sure what Proxy server is used, it is on the client end. I am
not sure if it is an ISA server or what, but I will indeed try that.
There isn't anything specifc I would need on the Web Services end,
correct? I wouldn't think so...

Thanks.

Vadym Stetsyak wrote:
Hello, dan!

What proxy server is used?
sometimes it works when you only specify user name and leave domain empty in
NetworkCredential.

Try different combinations:
- domain\user
- user

dkI am writing a c# application which connects to web services through
dka
dkProxy Server. I am running a local Proxy Host to simulate what the
dkuser is seeing, and his problem is he is getting a 407 error, Proxy
dkAuthentication Required. I am applying the credentials and I
dkrealize I

dkam probably just missing something. Here is my code, do I need any
dkmodifications on the Web Service?
dkWebService service = new WebService();
dkWebProxy proxy = new WebProxy(this.txtProxyHost.Text,
dkint.Parse(this.txtPort.Text));
dkproxy.BypassProxyOnLocal = true;
dkNetworkCredential cred = new
dkNetworkCredential(this.txtUserName.Text,
dk this.txtPassword.Text,
dk this.txtDomain.Text);
dkproxy.Credentials = cred;
dkservice .Timeout = 20000;
dkservice .Proxy = proxy;
dkWebRequest req = WebRequest.Create(service .Url);
dkreq.Proxy = proxy;
dk******************
dkMe again, the last two lines I am unsure about, but do I need to do
dkanything special when accessing the Web Method?
dkI saw something about Proxy-Authentication which may be an issue,
dkbut
dkagain, not sure if applicable here.
dkThank you in advance.!
--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Nov 26 '06 #2

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

Similar topics

9
by: MSDNAndi | last post by:
Hi, I have a set of simple webservices calls that worked fine using .NET Framework 1.0. I am calling a Java/Apache based webservices, the calling side is not able to supply a proper WSDL. ...
1
by: Tony Stephens | last post by:
Hi, I've created a small forms based application in c# to test a vendor's product and the web service interface that it exposes. We have deployed two instances of the vendor product one which...
2
by: Robin Haswell | last post by:
Hey there Soon we will have many squid proxies on many seperate connections for use by our services. I want to make them available to users via a single HTTP proxy - however, I want fine-grained...
3
by: Arpan | last post by:
Web Services make use of proxy classes whose methods & properties are accessed in exactly the same way as how a normal class' methods & properties are accessed. So what for does ASP.NET generate...
5
by: ayaz.usman | last post by:
Hi, I've built a web services proxy server, in C# using wsdl.exe, by importing wsdl. Howeever, when I go to : http://localhost/sample.asmx?wsdl, they wsdl there does not match the wsdl I fed...
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...
2
by: Peter | last post by:
Firstly let me be very clear about this, I do not want to create a web service proxy nor do I want to do anything with web services. Basically, I have a shrink wrapped desktop application which...
4
by: Jon | last post by:
I wrote a VS 2005 C# express programme that accesses a web service. It works fine when there's a direct connection to the internet, but on two different PCs with internet access via a proxy, I get...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.