Uploading WSP files programmatically to remote SharePoint farms

by Ради Атанасов 1. December 2010 11:19

I was researching the possibility to upload a WSP file remotely, without logon access to any SP servers on a farm.

This is possible with the SPFarm.Open method, as long as you have access to the database. Firewalls should also allow access.

I have created a simple solution to demonstrate this: go to this page and click Download

The code to achieve this is fairly simple:

SPFarm.Open
  1. string connString = txtConnectionString.Text;
  2.  
  3. SPFarm remoteFarm = SPFarm.Open(connString);
  4.  
  5. remoteFarm.Solutions.Add(txtWSPPath.Text);

Hope this helps!

Tags: ,

English

Comments

Add comment


(Will show your Gravatar icon)

biuquote
  • Comment
  • Preview
Loading



Microsoft Certified Master

SharePoint Server MVP

About the author

SharePoint architect, consultant and solution developer.

Аз съм консултант, архитект и разработчик на SharePoint решения.

Feeds

Get RSS Feed (Bulgarian)
Get RSS Feed (English)    
Get RSS Feed  (Both)        

I blog about technical concepts in English, as they benefit the whole community, but sometimes I blog about stuff specific to Bulgaria, and those I post in Bulgarian. The above feed URL's let you choose what to subscribe to.

My SharePoint Forum Activity