Subscribe in a reader Accessing Sharepoint Documents from Winforms via HTTPS

Accessing Sharepoint Documents from Winforms via HTTPS

by JamieMcAllister 2/10/2008 11:49:00 AM

 I was recently asked how someone could access a document in a Sharepoint list from a Winforms client. His only caveat was that it was secured via SSL.

This is the code I gave him, and it seems to work!

System.Net.WebClient Client = new System.Net.WebClient();

Client.UseDefaultCredentials = false ;

System.Net.ICredentials creds;

creds = new System.Net.NetworkCredential(@"MyUserID", "MyPassword");

Client.Credentials = creds;

Client.DownloadFile("https://www.MyDomain.com/someFolder/shared%20documents/DocumentIWant.doc", @"C:\DocumentIWant.doc");

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Sharepoint | .NET

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

11/20/2008 8:28:31 PM

Powered by BlogEngine.NET 1.3.0.0
Theme by Mads Kristensen

About the author

Jamie McAllister Jamie McAllister
Manchester (UK) Based Consultant for Northridge Solutions Ltd.


Jamie McAllister Linked In

        
        
        
        
        
        
        

Calendar

<<  November 2008  >>
MoTuWeThFrSaSu
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

View posts in large calendar

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

Sign in

Disclaimer: The software and source code on this website is provided "AS IS"
with no warranties of any kind. The entire risk arising out of the use or
performance of the software and source code is with you.