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

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

orekinAsked:
Who is Participating?
 
surajgupthaCommented:
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
 
surajgupthaCommented:
Do you have the PAC file pointed to in your internet explorer?
0
 
orekinAuthor Commented:
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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
surajgupthaCommented:
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
 
orekinAuthor Commented:
Hi
Yes to both questions.  
cheers
Orekin
0
 
surajgupthaCommented:
Did it work when you removed the pac file from ie settings?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.