winforms - Trying to make OneDrive connector in Windows Form app -


i making winform application using c#. when try connect onedrive using sharepoint client object model gives me error of "value cannot null".

please guide me making mistake. need guidance on this.

      private void getclientcontext()     {         using (clientcontext clientcontext = new clientcontext("https://techiesworld-my.sharepoint.com/"))         {             securestring password = new securestring();             //passtxt.text = password.tostring();              //foreach (char c in passtxt.text.tochararray()) password.appendchar(c);              clientcontext.credentials = new sharepointonlinecredentials(accountxt.text, password);              web web = clientcontext.web;              clientcontext.load(web);              clientcontext.executequery();              messagebox.show(web.title);           } 

i getting exception on clientcontext.executequery() function.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -