I am trying to access a list in a site collection of different farm using CSOM.
But I am getting the error:
The remote server returned an error: (401) Unauthorized."
Code I used is below.
using (ClientContext ctx = new ClientContext(URL))
{
Web web = ctx.Site.RootWeb;
ctx.Load(web);
ctx.ExecuteQuery();
Console.Write(web.Title);
}
Always getting the authentication error. Is any special configuration required between farms? Please help. Thanks in advance.