1

I have a dll which will retrieve certain information from internet. I'm calling this dll from my wrapper application. But the dll cannot access internet because it behind corporate proxy. Is there any way by which I can so authentication in the wrapper application, (eg by providing an interface to enter proxy username and password), so that the dll can access internet.

EDITED:: I'm accessing Google Data API dll which accepts username and password to login.

3 Answers 3

3

Do you control the code within the DLL? How does the DLL request the information? .NET certainly has proxy handling for things like WebClient and HttpWebRequest, but you'll need to give more information about the situation.

EDIT: Unfortunately I can't see anything in the GData API which exposes a proxy property.

You could try just setting the default proxy using GlobalProxySelection.Select. If that doesn't work, let me know and I'll try asking for suggestions internally.

Sign up to request clarification or add additional context in comments.

Comments

1

You can assign the Proxy property of your WebRequest or WebClient object to a WebProxy object that has the required settings applied. It basically works as follows:

WebRequest request = WebRequest.Create("http://www.mysite.com"); 
request.Proxy = new WebProxy("127.0.0.1", 8080); 

You can also assign a username/password using the Credentials property of the WebProxy.

See the examples associated with the WebProxy class on MSDN.

2 Comments

He is asking how can he set proxy for Gdata api dll , not his web reqeust or web client class? read the question buddy!
I suggest you read the question before the edit, buddy! There was no mention of a third party library such as Gdata.
0

The GDATA Api uses your Global IE proxy, try setting your IE global proxy using the required registry keys from your wrapper application, GData api will pick it up automatically.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.