You need to sign in to do that
Don't have an account?
C# Proxy Issue
All,
I am having an issue running the basicSample_cs to demonstrate connectivity using C#. I believe my problem is more of a C# issue, rather than Salesforce.com, but I am hoping that someone on the discussion boards has ran into this issue before and found a way to correct it.
I have setup the basicSample code and have been able to have it execute correctly, logging into my developer org_unit, when there isn’t a proxy server involved. However, I have attempted to do the same on a network that requires a proxy server to access internet addresses, and I have been unable to achieve even a successful login.
The network I am on uses a proxy server script, so I don’t think the “auto-locating” of the proxy information is working by default in C#. I have also tried to set the proxy server address manually using the following lines of code, but it doesn’t appear to be working.
<code snippet>
WebProxy myWebProxy = new WebProxy();
// Real address used in actual code
Uri newUri = new Uri("http://proxy_server:port_number");
myWebProxy.Address = newUri;
binding = new SforceService();
binding.Timeout = 15000;
binding.Proxy = myWebProxy;
I am unsure if there is another property I need to set?
Any help would be greatly appreciated!
Thanks!
Thanks!
CredentialCache cache = new CredentialCache();
cache.Add(uri, "Basic", new NetworkCredential(_proxyUserName, _proxyPassword));
cache.Add(uri, "Negotiate", new NetworkCredential(_proxyUserName, _proxyPassword));
proxyObject.Credentials = cache;
binding.Proxy = proxyObject;
Muthu
i found your post while looking for ways to use a proxy server to access the Salesforce API. i will appriciate it you could answer the following questions