473,802 Members | 1,984 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.t xtProxyHost.Tex t,
int.Parse(this. txtPort.Text));
proxy.BypassPro xyOnLocal = true;
NetworkCredenti al cred = new NetworkCredenti al(this.txtUser Name.Text,
this.txtPasswor d.Text,
this.txtDomain. Text);

proxy.Credentia ls = cred;
service .Timeout = 20000;
service .Proxy = proxy;
WebRequest req = WebRequest.Crea te(iobWebServic e.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 1263

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

Similar topics

6
7938
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 Internet Explorer connection settings (proxy:8080). However, as soon as this setting is enabled, the remoting program running on their pc stops communicating with the server it sends data to. I've disabled proxy setting on the affected pc, rebooted...
9
3222
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. What it does is to call a webservice with two parameters, one being a integer, the other one being a "String" which contains XML (not the best practice, however that is the target interface and we cannot change that).
0
1799
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 application UI that allows the user to enter the proxy server information if needed. When the user selects the "Use Proxy" Checkbox in the settings tab, I ask them to provide the server address and port number and also the login information is...
0
1084
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 displays a "Discovery Credentials for Proxy Server" dialog. Issue #1: when I enter my proxy' server credentials the dialog times out with an "Unable to connect to the remote server" error. Issue #2 (and the most important): how do I tell VS.Net 2005...
4
9173
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 Server coChannel = new TcpClient(this.HostName, this.Port); coReader = new StreamReader(coChannel.GetStream());
0
1827
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 information it gets back to findout if it can connect to the service properly. If there is an error it will catch an exception and everything is fine. This used to work wonderfully, until somebody decided they needed to use a proxy server. (rats!) It's...
1
4352
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 proxy the connections to which must be authenticated. The 400 error are comming fron the wed server back through the proxy. When I Sniff the connections I can see that the http message that is causing the issue is one that is part of the...
2
3490
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 HttpWebRequest object. Under normal circumstances I am able to use the webservice without any problems. But after using an HttpWebRequest object to make a call to a website all subsequent attempts to use the WebService will fail with a 401...
2
2935
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 server that I have built. The code that tries to connect to the web service breaks if the laptop is not within our network. Further debugging has revealed that this is due to a proxy server issue. Our domain sets the proxy server via GPO for all...
0
9699
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10538
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10063
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9115
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7598
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6838
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4270
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3792
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2966
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.