Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Connecting to SharePoint via https

  Asked By: Lyndsey    Date: Dec 22    Category: Sharepoint    Views: 817

I apologize if this is posted in the wrong area; I'm not really familiar with SharePoint.

I'm trying to find out what would be involved in downloading a file that is shared using SharePoint via a secure web connection.

I have a client from which I would like to download an automated feed on a scheduled basis. He has said he can share it via SharePoint over SSL with a username and password. My development environment is ASP.NET 2.0. What I'd like to know is how I would go about programmatically downloading this shared feed in a secure manner.



1 Answer Found

Answer #1    Answered By: Malcolm Maxwell     Answered On: Dec 22

Not really sure what the form of your 'shared feed' is. If it's a flat file  in a Sharepoint List for instance, the following code would download  it within a Winforms .NET 2.0 client  with the right credentials supplied;

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");

Didn't find what you were looking for? Find more on Connecting to SharePoint via https Or get search suggestion and latest updates.