Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Visual J# / February 2004

Tip: Looking for answers? Try searching our database.

by-passing proxy

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andrew Jones - 02 Feb 2004 23:35 GMT
Hi,

In JAVA I can by pass the proxy using these lines of code:

 System.getProperties().put( "proxySet", "true" );
 System.getProperties().put( "proxyHost", "web-proxy" );
 System.getProperties().put( "proxyPort", "8088" );

But when I move this code to J# for an ASP.Net page it does not affect
anything. When I run the page from home (no proxy present) I can connect to
the server. When I add the above code to the project and run it from home it
STILL connects to the server so I know these lines are not doing a thing.

Even Microsoft's J# .Net code to bypass a proxy server does NOT work (or at
least how I'm doing it. Maybe my understanding of all this is off):

WebProxy proxyObject = new WebProxy("web-proxy:8088", true);

proxyObject.set_BypassProxyOnLocal(true);

GlobalProxySelection.set_Select(proxyObject);

The above J# .Net code doesn't affect the asp.net page from connecting to
the outside server at home even when the code is present or commented out.

I had to convert a JAVA program to J# to make it a web page in .Net.
Basically the page connects to a shipping carrier's XML server to get data.
The code works in JAVA and the J# page works at home but NOT at work.

So I'm wondering if there is something else I need to do to get this JAVA
code to work in J#?

Thanks!

Andrew
Lars-Inge T?nnessen - 04 Feb 2004 18:03 GMT
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemWebServicesProtoco
lsHttpWebClientProtocolClassProxyTopic.asp


In this example they specify the protocol (http). Do you think that could
help?

IWebProxy proxyObject = new WebProxy("http://proxyserver:80", true);

Signature

Regards,
Lars-Inge Tonnessen
http://emailme.larsinge.com
http://www.larsinge.com

> WebProxy proxyObject = new WebProxy("web-proxy:8088", true);

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.