Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

VB.NET 1.1, Web Services, Behind Company Proxy, Want to Read Pac File

Posted on 2007-10-13
6
Medium Priority
?
319 Views
Last Modified: 2010-05-18
Hi
I am in a big corporate behind a proxy.  To call a web service the following code works fine:
                Dim pr As System.Net.WebProxy = New WebProxy("ipAddress", 8080)
                pr.Credentials = System.Net.CredentialCache.DefaultCredentials
                binding.Proxy = pr

However the above requires me to know the IP address of the proxy in advance and I have been asked to read the Pac file at run time.

I found this article - http://www.codeproject.com/cs/internet/using_pac_files_proxy.asp - But in the GetProxyForUrlUsingPac routine it thinks it has been successful but the function returns null.

Any other ideas ?

Thanks
Nick

0
Comment
Question by:orekin
  • 4
  • 2
6 Comments
 
LVL 21

Expert Comment

by:surajguptha
ID: 20071066
Do you have the PAC file pointed to in your internet explorer?
0
 

Author Comment

by:orekin
ID: 20075415
Yes.  In 'LAN Settings' use automaitc configuration script is ticked and the path to the pac file is there.  The pac file is there as a http address:

http://sq-proxy.CompanyName:Port/sq-proxy.pac
0
 
LVL 21

Expert Comment

by:surajguptha
ID: 20075749
Have you also changed the Pac uri address in the code?
Can you make sure that the pac file is accessible by typing that pac file in ie window and checking if it downloads?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:orekin
ID: 20076845
Hi
Yes to both questions.  
cheers
Orekin
0
 
LVL 21

Accepted Solution

by:
surajguptha earned 1500 total points
ID: 20077129
Well it is supposed to work !!! Cant understand why :(
Have you tried removing the pac file from the ie settings and see if you get a response?

If you still dont get a response we can try using someother option than the one in code project
0
 
LVL 21

Expert Comment

by:surajguptha
ID: 20092514
Did it work when you removed the pac file from ie settings?
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Make the most of your online learning experience.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Loops Section Overview

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question