SharePoint 2010 Client Object Model - Proxy Authentication Required
Asked Answered
F

1

1

All,

A small but irritating issue.

I am trying to create a DLL that uses the Client Object model to change a Site Tile

                Microsoft.SharePoint.Client.ClientContext myCContext = new Microsoft.SharePoint.Client.ClientContext(lsiteurl);

                System.Net.NetworkCredential ReqCredential = new NetworkCredential("user", "pwd", "domain");
                System.Net.WebProxy ReqProxy = new System.Net.WebProxy("IP:8080", false);
                myCContext.Credentials = ReqCredential;
                ReqProxy.Credentials = ReqCredential;
                WebRequest.DefaultWebProxy = ReqProxy;
                //GlobalProxySelection.Select = ReqProxy;

                Microsoft.SharePoint.Client.Web lWeb = myCContext.Web;

                myCContext.Load(lWeb);
                lerror = "Load SPWeb";
                myCContext.ExecuteQuery();

But What I try, Every time it throws an exception on the myCContext.ExecuteQuery()

Every time the same error "407 Proxy Authentication Required", please help me resolve this issue

the solution in How do I pass my proxy credentials to a SharePoint Client Context object...? (SharePoint Client Object Model) does nothing, even the creating the new Network credentials, Proxy, ...

Thx for any help

Floodgate answered 16/8, 2012 at 11:1 Comment(0)
M
0

If you go in to your internet options -> connections -> Lan settings in internet explorer you should be able to get your proxy settings from there

in your web config the same as the above link

<system.net>
    <defaultProxy>
 <proxy proxyaddress="address:port" bypassonlocal="True" />
    </defaultProxy>
  </system.net>

Give the application pool that your site resides on a recycle or a IISreset and see if this does the trick.

This resolved the same issue you are currently experiencing

Also check the you are doing this in the correct web config, Sounds stupid but i have seen people do this before.

Monovalent answered 16/8, 2012 at 13:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.