473,800 Members | 2,379 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

WebProxy and Web Service

Hello,

I am not sure what is wrong, but here is what is going on: I have a
small Web Proxy server running to test real users using a proxy. It is
a basic one c#, seems to work. In my test application, I am trying to
connect to a Web Service going through the proxy. When I don't go
through it, obviously it works fine. Here is my code:

MyWebService service = new ProxyTest.MyWeb Service();

WebProxy proxyObject = new WebProxy("local host:8889/",true);

if (requires auth)
{
NetworkCredenti al cred = new
NetworkCredenti al(this.txtProx yUsername.Text,
txtProxyPasswor d.Text,
txtProxyDomain. Text);

CredentialCache credCache = new CredentialCache ();
credCache.Add(n ew Uri("localhost: 8889/"), "Negotiate" , cred);
proxyObject.Cre dentials = credCache;
}

service.Proxy = proxyObject;

========== this works fine ============

When I try to than consume a Web Method, it times out and in the proxy
server application, I get the following error:

Connection from 127.0.0.1:4852
System.Net.Sock ets.SocketExcep tion: The requested name is valid and was
found in
the database, but it does not have the correct associated data being
resolved f
or
at System.Net.Dns. GetHostByName(S tring hostName)
at System.Net.Dns. Resolve(String hostName)
at ProxyHost.Class 1.run() in c:\develop\prox yhost\class1.cs :line 53

Am I missing something?

Thanks in advance.

- Dan

Sep 13 '06 #1
0 1595

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

Similar topics

4
13373
by: vooose | last post by:
Consider accessing a webpage through a proxy server: WebRequest request = WebRequest.Create("http://somepage.com"); WebProxy proxy = new WebProxy(proxyHost, proxyPort); proxy.Credentials = new NetworkCredential(proxyUsername, proxyPassword); request.Proxy = proxy; Now suppose the *proxy server* authenticates using NTLM (somepage.com does NOT require any authentication its just a webpage). How does one
2
5667
by: Sam Santiago | last post by:
I am using the WebProxy.GetDefaultProxy() function to read the IE settings, but it's returning an empty WebProxy object. Are there any known reasons why this is not reading the proxy settings in IE 6? Thanks, Sam -- _______________________________ Sam Santiago ssantiago@n0spam-SoftiTechture.com
0
3706
by: Michael S. Scherotter | last post by:
I am building a C# desktop application in .Net 1.1 that consumes web services. I use System.Net.WebProxy.GetDefaultProxy() to get the proxy settings from IE but I get reports from people who are using proxy servers that this doesn't work and the web service does not connect. System.Net.WebProxy proxy = System.Net.WebProxy.GetDefaultProxy(); Any suggestions on how I can get the actual proxy settings that IE is using, even if it...
4
3487
by: Andrew | last post by:
Morning everybody, I have an XML document located on a web address and I wish to create a C# program to read that XML document and process it - which shouldn't be that difficult yet I'm running into all kinds of problems because I'm behind a firewall. After much searching I found using WebProxy, NetworkCredentials and HttpWebResponse/Request to be quite useful but again it's not really working the way I'd like. So I decided to setup a...
3
9106
by: John A Grandy | last post by:
I am always RAS'd into MS CorpNet VPN under my REDMOND account. I am always able to ping "itgproxy.redmond.corp.microsoft.com" I instantiate a System.Net.WebProxy object as follows: using System.Net; string proxyUrl = http://itgproxy.redmond.corp.microsoft.com; WebProxy proxy = new WebProxy(proxyUrl, true); MSNSearchService.Proxy = proxy;
0
1933
by: Armin Prosch | last post by:
Hi, we call a web service in an intranet environment. The target host is bypassed as of the IE setting. We retrieve the system proxy settings through "myService.Proxy = WebRequest.GetSystemWebProxy()". The host is in the isBypassed list of the proxy object. The proxy credentials are the default credentials of the login account (DefaultCredentials) and this account is able to browse to the web service via IE. But when we want to connect...
0
2120
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 consumes an external web service. It has passed a userid and password to a web proxy object to pass through our corporate proxy server and has been running fine for weeks. Our operations staff has just changed the proxy server so that it now...
3
4222
by: =?Utf-8?B?TXJOb2JvZHk=?= | last post by:
I found an example online and when I tried repeating it with the proxy I normally use for my browser, I get errors. What I do is this: WebProxy proxy = new WebProxy("http://www.autoconfig/pac", true); That url is exactly what I enter into Firefox advanced settings to get beyond the office firewall here, but C# does not like it.
7
2994
by: Phil | last post by:
According to the help this method is obsolete, but there is no hint as to what to use now instead. It does seem to work for me, although I get a warning error from the compiler. The warning message contains a link to the microsoft website, but this link just takes you to the .Net framework home page: http://go.microsoft.com/fwlink/?linkid=14202 Can anyone provide the correct link and/or please explain what should now be used instead of...
0
9690
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
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10275
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10253
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9085
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
7576
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
6811
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();...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
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

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.