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

Proxy Server Issue

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(iobWebService.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.!

- Dan

Nov 20 '06 #1
0 1228

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

Similar topics

6
by: harry | last post by:
Hi, I have a program that runs on multiple client pc's. Occasionally one or more of those pc's use VPN to connect to another corporate network. When using VPN they need to set proxy server in...
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. ...
0
by: r | last post by:
Hello All, I am working on a desktop application using C#. The application connects to a remote webservice to update and retrieve data from a database. I also have a settings Tab in the...
0
by: Richard Purchas | last post by:
The webservice I'm trying to create a VS.Net 2005 reference for is behind a proxy server. When I select "Add Web Reference", enter the URL of the webservice, click "go" etc. the dialog then...
4
by: Peter | last post by:
Hi I rewrite an old C Programm to C# (Framework 1.1) - it is an easy FTP- Client. I create a "Command-Channel" using TcpClient, a "Command-Reader" and a "Command-Writer" to speak with the FTP...
0
by: Maxx57 | last post by:
C# VS.Net 1.1 (2003) - trouble with using IE proxy server settings I've got a program that detects if it can connect to a webservice. It sends a System.Net.WebRequest and then checks the...
1
by: JohnH | last post by:
Hi, In my application which has two or more threads calling web service or just HttpWebRequest I am seeing some HTTP 400 errors retrun in the response. All the calls are going through the same ISA...
2
by: =?Utf-8?B?TGFycnlLdXBlcm1hbg==?= | last post by:
Our WebDev team seems to have found a problem that exposes a bug in .NET 2.0. This problem can be shown when trying to access a WebService using SSL and through a proxy server after using the...
2
by: | last post by:
Hi all, I have an asp.net 2.0 website that accesses a locally hosted web service. This works fine on servers that are connected to our network. However, I am having a problem with a laptop...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.