Created
October 19, 2014 11:14
-
-
Save mwiedemeyer/151eaeb7e5ecac1b36d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Main(string[] args) | |
{ | |
ClientContext context = new ClientContext("https://sharepoint/sites/test1"); | |
context.ExecutingWebRequest += context_ExecutingWebRequest; | |
var web = context.Web; | |
context.Load(web); | |
context.ExecuteQuery(); | |
Console.WriteLine("Title: " + web.Title); | |
} | |
static void context_ExecutingWebRequest(object sender, WebRequestEventArgs e) | |
{ | |
e.WebRequestExecutor.WebRequest.PreAuthenticate = true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment