473,788 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Q: Proxy in The Middle

Hi,

I am learning to code a WinForm application which will need to access a Web
Service outside the University network. Our University require us to go
through a proxy in order to access the Internet. In addition, the proxy
require us to authenticated before allow us to go through it.

I have coded something like below (without changing anything other things):

WebProxy proxyObject = new WebProxy("proxy .myUni.edu.au", 8080); //
Without "http://"
proxyObject.Byp assProxyOnLocal = true;
proxyObject.Cre dentials = new NetworkCredenti al("myUserName" ,
"myPassword ");
this.myWebServi ce.Proxy = proxyObject;

myWebService.Da tabaseQueryFunc tion("aString", anInt);

It run perfectly when I tried without coding to use proxy and run the
application at home. Unfortunately, when I run the application in the
University and modify the code to use proxy; whenever calling the webservice
function, the application will get "Time Out" error. I am pretty sure it
found the proxy server because I can see "proxy.myUni.ed u.au 8080 TIME_WAIT"
by using netstat command.

Anyone know is there anything wrong with my code?

Thank you.

--
Soul

Nov 15 '05 #1
3 2207

Hi Soul,

If you just set the proxy.myUni.edu .au:8080 in the Internet Explorer's
proxy setting, can you access the Web site that expose the web service?
I think you also can try to modify your application, not use the proxy to
visit the web service, but just use WebBrowser control(or IE component) to
visit this web site through this WebProxy class to test whether you can
use the WebProxy.

You also can try to add http:// to the constructor of WebProxy, if this
takes effect?

Hope this helps,

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Reply-To: "Soul" <so********@ant isocial.com>
| From: "Soul" <no@spam.com>
| Subject: Q: Proxy in The Middle
| Date: Thu, 9 Oct 2003 17:47:14 +1000
| Lines: 34
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="utf-8"
| Content-Transfer-Encoding: 7bit
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <uO************ **@TK2MSFTNGP11 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| NNTP-Posting-Host: dsl-203-113-216-2.vic.netspace. net.au 203.113.216.2
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP11.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1901 50
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
|
| Hi,
|
| I am learning to code a WinForm application which will need to access a
Web
| Service outside the University network. Our University require us to go
| through a proxy in order to access the Internet. In addition, the proxy
| require us to authenticated before allow us to go through it.
|
| I have coded something like below (without changing anything other
things):
|
| WebProxy proxyObject = new WebProxy("proxy .myUni.edu.au", 8080); //
| Without "http://"
| proxyObject.Byp assProxyOnLocal = true;
| proxyObject.Cre dentials = new NetworkCredenti al("myUserName" ,
| "myPassword ");
| this.myWebServi ce.Proxy = proxyObject;
|
| myWebService.Da tabaseQueryFunc tion("aString", anInt);
|
| It run perfectly when I tried without coding to use proxy and run the
| application at home. Unfortunately, when I run the application in the
| University and modify the code to use proxy; whenever calling the
webservice
| function, the application will get "Time Out" error. I am pretty sure it
| found the proxy server because I can see "proxy.myUni.ed u.au 8080
TIME_WAIT"
| by using netstat command.
|
| Anyone know is there anything wrong with my code?
|
| Thank you.
|
| --
| Soul
|
|
|
|

Nov 15 '05 #2
Hi Jeffrey,

Yape, I can access the .asmx file directly from the browser (IE) without any
problem if I enter the correct username and password when it ask for.
Moreover, I also able to successfully invoke those exposed function
correctly. I also have tried to include "http://" in front of the proxy
address, but problem still exist.

Actually, I'm consider very new to programming. I can't really understand
what you mean by WebBrowser control. I can't find the control in the
toolbox. But if I:

* Right click on the toolbox in VS.Net
* Select "Add/Remove"
* Select "Com Components" tab

I am able to find something similar - Microsoft Web Browser - Version 1.1,
is this the one you mention? If yes, can you direct me to some resource on
how to use that control?

Thank you

--
Soul
"Jeffrey Tan[MSFT]" <v-*****@online.mi crosoft.com> wrote in message
news:sv******** ******@cpmsftng xa06.phx.gbl...
|
| Hi Soul,
|
| If you just set the proxy.myUni.edu .au:8080 in the Internet Explorer's
| proxy setting, can you access the Web site that expose the web service?
| I think you also can try to modify your application, not use the proxy to
| visit the web service, but just use WebBrowser control(or IE component) to
| visit this web site through this WebProxy class to test whether you can
| use the WebProxy.
|
| You also can try to add http:// to the constructor of WebProxy, if this
| takes effect?
|
| Hope this helps,
|
| Best regards,
| Jeffrey Tan
| Microsoft Online Partner Support
| Get Secure! - www.microsoft.com/security
| This posting is provided "as is" with no warranties and confers no rights.
|
| --------------------
| | Reply-To: "Soul" <so********@ant isocial.com>
| | From: "Soul" <no@spam.com>
| | Subject: Q: Proxy in The Middle
| | Date: Thu, 9 Oct 2003 17:47:14 +1000
| | Lines: 34
| | MIME-Version: 1.0
| | Content-Type: text/plain;
| | charset="utf-8"
| | Content-Transfer-Encoding: 7bit
| | X-Priority: 3
| | X-MSMail-Priority: Normal
| | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| | Message-ID: <uO************ **@TK2MSFTNGP11 .phx.gbl>
| | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| | NNTP-Posting-Host: dsl-203-113-216-2.vic.netspace. net.au 203.113.216.2
| | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP11.phx.g bl
| | Xref: cpmsftngxa06.ph x.gbl
microsoft.publi c.dotnet.langua ges.csharp:1901 50
| | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
| |
| | Hi,
| |
| | I am learning to code a WinForm application which will need to access a
| Web
| | Service outside the University network. Our University require us to go
| | through a proxy in order to access the Internet. In addition, the proxy
| | require us to authenticated before allow us to go through it.
| |
| | I have coded something like below (without changing anything other
| things):
| |
| | WebProxy proxyObject = new WebProxy("proxy .myUni.edu.au", 8080); //
| | Without "http://"
| | proxyObject.Byp assProxyOnLocal = true;
| | proxyObject.Cre dentials = new NetworkCredenti al("myUserName" ,
| | "myPassword ");
| | this.myWebServi ce.Proxy = proxyObject;
| |
| | myWebService.Da tabaseQueryFunc tion("aString", anInt);
| |
| | It run perfectly when I tried without coding to use proxy and run the
| | application at home. Unfortunately, when I run the application in the
| | University and modify the code to use proxy; whenever calling the
| webservice
| | function, the application will get "Time Out" error. I am pretty sure it
| | found the proxy server because I can see "proxy.myUni.ed u.au 8080
| TIME_WAIT"
| | by using netstat command.
| |
| | Anyone know is there anything wrong with my code?
| |
| | Thank you.
| |
| | --
| | Soul
| |
| |
| |
| |
|

Nov 15 '05 #3

Hi Soul,

It seems that this problem is documented in the Knoledge Base, you can
refer to the 2 links below to see if it resoves your problem:
http://support.microsoft.com/default...b;en-us;318140
http://support.microsoft.com/default...b;en-us;307220

Btw: the "Microsoft Web Browser" you find was just what I mentioned, it is
a component that expose the function similiar to the Internet Explorer.
I think you can use WebProxy to work with it to access the website that
expose the webservice.
To use this Web Browser control, you can just refer it members in the
"Object Browser" window.

Hope this helps,

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Reply-To: "Soul" <so********@ant isocial.com>
| From: "Soul" <no@spam.com>
| References: <uO************ **@TK2MSFTNGP11 .phx.gbl>
<sv************ **@cpmsftngxa06 .phx.gbl>
| Subject: Re: Q: Proxy in The Middle
| Date: Sat, 11 Oct 2003 03:18:54 +1000
| Lines: 112
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="utf-8"
| Content-Transfer-Encoding: 7bit
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <Ob************ *@TK2MSFTNGP10. phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| NNTP-Posting-Host: dsl-203-113-220-14.vic.netspace .net.au 203.113.220.14
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1906 10
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
|
| Hi Jeffrey,
|
| Yape, I can access the .asmx file directly from the browser (IE) without
any
| problem if I enter the correct username and password when it ask for.
| Moreover, I also able to successfully invoke those exposed function
| correctly. I also have tried to include "http://" in front of the proxy
| address, but problem still exist.
|
| Actually, I'm consider very new to programming. I can't really understand
| what you mean by WebBrowser control. I can't find the control in the
| toolbox. But if I:
|
| * Right click on the toolbox in VS.Net
| * Select "Add/Remove"
| * Select "Com Components" tab
|
| I am able to find something similar - Microsoft Web Browser - Version 1.1,
| is this the one you mention? If yes, can you direct me to some resource on
| how to use that control?
|
| Thank you
|
| --
| Soul
|
|
| "Jeffrey Tan[MSFT]" <v-*****@online.mi crosoft.com> wrote in message
| news:sv******** ******@cpmsftng xa06.phx.gbl...
| |
| | Hi Soul,
| |
| | If you just set the proxy.myUni.edu .au:8080 in the Internet Explorer's
| | proxy setting, can you access the Web site that expose the web service?
| | I think you also can try to modify your application, not use the proxy
to
| | visit the web service, but just use WebBrowser control(or IE component)
to
| | visit this web site through this WebProxy class to test whether you can
| | use the WebProxy.
| |
| | You also can try to add http:// to the constructor of WebProxy, if this
| | takes effect?
| |
| | Hope this helps,
| |
| | Best regards,
| | Jeffrey Tan
| | Microsoft Online Partner Support
| | Get Secure! - www.microsoft.com/security
| | This posting is provided "as is" with no warranties and confers no
rights.
| |
| | --------------------
| | | Reply-To: "Soul" <so********@ant isocial.com>
| | | From: "Soul" <no@spam.com>
| | | Subject: Q: Proxy in The Middle
| | | Date: Thu, 9 Oct 2003 17:47:14 +1000
| | | Lines: 34
| | | MIME-Version: 1.0
| | | Content-Type: text/plain;
| | | charset="utf-8"
| | | Content-Transfer-Encoding: 7bit
| | | X-Priority: 3
| | | X-MSMail-Priority: Normal
| | | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| | | Message-ID: <uO************ **@TK2MSFTNGP11 .phx.gbl>
| | | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| | | NNTP-Posting-Host: dsl-203-113-216-2.vic.netspace. net.au 203.113.216.2
| | | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP11.phx.g bl
| | | Xref: cpmsftngxa06.ph x.gbl
| microsoft.publi c.dotnet.langua ges.csharp:1901 50
| | | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
| | |
| | | Hi,
| | |
| | | I am learning to code a WinForm application which will need to access
a
| | Web
| | | Service outside the University network. Our University require us to
go
| | | through a proxy in order to access the Internet. In addition, the
proxy
| | | require us to authenticated before allow us to go through it.
| | |
| | | I have coded something like below (without changing anything other
| | things):
| | |
| | | WebProxy proxyObject = new WebProxy("proxy .myUni.edu.au", 8080);
//
| | | Without "http://"
| | | proxyObject.Byp assProxyOnLocal = true;
| | | proxyObject.Cre dentials = new NetworkCredenti al("myUserName" ,
| | | "myPassword ");
| | | this.myWebServi ce.Proxy = proxyObject;
| | |
| | | myWebService.Da tabaseQueryFunc tion("aString", anInt);
| | |
| | | It run perfectly when I tried without coding to use proxy and run the
| | | application at home. Unfortunately, when I run the application in the
| | | University and modify the code to use proxy; whenever calling the
| | webservice
| | | function, the application will get "Time Out" error. I am pretty sure
it
| | | found the proxy server because I can see "proxy.myUni.ed u.au 8080
| | TIME_WAIT"
| | | by using netstat command.
| | |
| | | Anyone know is there anything wrong with my code?
| | |
| | | Thank you.
| | |
| | | --
| | | Soul
| | |
| | |
| | |
| | |
| |
|
|

Nov 15 '05 #4

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

Similar topics

2
2179
by: Glauco | last post by:
I'm using a library based on httplib. Recently i've done a conversion for use of https with a key and certificate file. This goes perfectly :-) . Now, the problem is passing throw an http_proxy. It seems because httplib (based on socket.py) try to autenticate on the proxy. I'm only with this problem ? it's impossible :-|
3
5755
by: Muhammad Ali | last post by:
Hi, I am a python newbie but have c/c++ experience. I have a small Lan (windows 2000 sever + some win 98 machines). The win2k connects to the internet using a dial-up connection. What i need to do is to allow users, who would come from win98 machines to use internet for a specific amount of time. For example, if userA has been alloted twohours then he can no longer access internet from the win98 machine after expiring those two hours.
16
60617
by: Paul Sweeney | last post by:
Does anyone know of a working (python) https proxy which allows viewing of unencrypted data being sent from my browser to an https site? I've worked my way through most on the list at http://xhaus.com/alan/python/proxies.html, but while many claim to support https, if you actually point your browser at the proxies, they work fine for http, but not for https pages. TIA
4
17738
by: Fuzzyman | last post by:
In a nutshell - the question I'm asking is, how do I make a socket conenction go via a proxy server ? All our internet traffic has to go through a proxy-server at location 'dav-serv:8080' and I need to make a socket connection through it. The reason (with code example) is as follows : I am hacking "Tiny HTTP Proxy" by SUZUKI Hisao to make an http proxy that modifies URLs. I haven't got very far - having started from zero knowledge of...
0
1196
by: Iker Arizmendi | last post by:
Hello all. Is there a convenient scheme within a C extension to add methods to a type in such a way as to allow me to transparently add a "proxy" around them? For example: typedef PyObject* (*PyMethodCall)(PyObject*, PyObject*); PyObject* middleMan(PyObject* self, PyObject* args) { printf("Before call to wrapped funct\n");
0
1008
by: George Bool | last post by:
Hello, I have a simple webservice that accepts a network credential as an argument to a webmethod. When i create a proxy for my client to use, the proxy generator then recreates a new type mywebservicename.networkcredential such that when i try to pass a system.net network credential to the
2
2899
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 control over how the squid proxies are selected for each connection. This is so I can collect statistics, control usage on each proxy, monitor what's going on - etc. However I don't want to implement the HTTP proxy protocol in Python, and would...
5
2170
by: Gary | last post by:
I've seen examples for HTTP and FTP use, but not for simply any TCP data on any port, which is what I require. Can anyone please point me in the right direction? TIA
5
5474
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 our own configuration management that follows our application lifecycle (development/system test/production). Also, most of the proxies we build are for the middle-tier layer. 2. Create a wrapper to follow WCF Client best practices (proxy.close...
0
9498
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
10173
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
10110
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
8993
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...
0
5399
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4070
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
3674
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
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.