473,395 Members | 1,456 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,395 software developers and data experts.

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.BypassProxyOnLocal = true;
proxyObject.Credentials = new NetworkCredential("myUserName",
"myPassword");
this.myWebService.Proxy = proxyObject;

myWebService.DatabaseQueryFunction("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.edu.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 2185

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********@antisocial.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.public.dotnet.languages.csharp
| NNTP-Posting-Host: dsl-203-113-216-2.vic.netspace.net.au 203.113.216.2
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:190150
| X-Tomcat-NG: microsoft.public.dotnet.languages.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.BypassProxyOnLocal = true;
| proxyObject.Credentials = new NetworkCredential("myUserName",
| "myPassword");
| this.myWebService.Proxy = proxyObject;
|
| myWebService.DatabaseQueryFunction("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.edu.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.microsoft.com> wrote in message
news:sv**************@cpmsftngxa06.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********@antisocial.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.public.dotnet.languages.csharp
| | NNTP-Posting-Host: dsl-203-113-216-2.vic.netspace.net.au 203.113.216.2
| | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
| | Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.languages.csharp:190150
| | X-Tomcat-NG: microsoft.public.dotnet.languages.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.BypassProxyOnLocal = true;
| | proxyObject.Credentials = new NetworkCredential("myUserName",
| | "myPassword");
| | this.myWebService.Proxy = proxyObject;
| |
| | myWebService.DatabaseQueryFunction("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.edu.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********@antisocial.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.public.dotnet.languages.csharp
| NNTP-Posting-Host: dsl-203-113-220-14.vic.netspace.net.au 203.113.220.14
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:190610
| X-Tomcat-NG: microsoft.public.dotnet.languages.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.microsoft.com> wrote in message
| news:sv**************@cpmsftngxa06.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********@antisocial.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.public.dotnet.languages.csharp
| | | NNTP-Posting-Host: dsl-203-113-216-2.vic.netspace.net.au 203.113.216.2
| | | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
| | | Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.languages.csharp:190150
| | | X-Tomcat-NG: microsoft.public.dotnet.languages.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.BypassProxyOnLocal = true;
| | | proxyObject.Credentials = new NetworkCredential("myUserName",
| | | "myPassword");
| | | this.myWebService.Proxy = proxyObject;
| | |
| | | myWebService.DatabaseQueryFunction("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.edu.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
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....
3
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...
16
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...
4
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...
0
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*...
0
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 ...
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...
5
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
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...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
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...

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.