David's Cloud Strategy Blog

Everything SaaS, Azure and Cloud

Useful WSS 3.0 Samples

Useful WSS 3.0 Samples

  • Comments 6

In Dublin it's always raining, so there's always some time to post a new article. Two useful code snippets for WSS3 developers: 

Smartly export a document from a WSS Document Library:

// Set up the webclient with the correct credentials
WebClient webClient = new System.Net.WebClient();
webClient.Credentials = credential;

// Export the document to the given folder 
webClient.DownloadFile(documentUrl, docFullPath);

Smartly import (upload) a document to a WSS Document Library:

// Set up the webclient with the correct credentials
WebClient webClient = new System.Net.WebClient();
webClient.Credentials = credential;

// Upload the file
webClient.UploadFile(destinationUrl, "PUT", sourceFilePath);
Leave a Comment
  • Please add 6 and 3 and type the answer here:
  • Post
Page 1 of 1 (6 items)