Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Client Object Model - The remote server returned an error: (403) Forbidden.

$
0
0

Hello,

  •  I write the following code in console application to read data from list by client object Model :

            ClientContext context = new ClientContext("servername/sites/Dhofar/en-us");
            List list = context.Web.Lists.GetByTitle("MenuList");
            context.Load(list);
            context.ExecuteQuery();
            Console.WriteLine(list.Title);
            Console.ReadKey(false);

  • I got an exception "The remote server returned an error: (403) Forbidden." on line "context.ExecuteQuery()"
  • I run the console application the same server that has a SharePoint.

     How Can I solve this problem?


ASk


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>