Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

My company outsourced the creation of a SharePoint WebPart for connecting to our cloud service.

The WebPart connects to our service by using our REST API. When configuring the WebPart you supply credentials etc that are used for the communiction with our server.

The developers that created the WebPart created a WCF service in SharePoint that does all the communication with our service and the WebPart only talks to the WCF service. The plan is to have multiple WebParts for different information.

Now to the acctual question. This solution is created as a Farm solution (as I understand it; nothing else would be possible). But when we released this WebPart to our customers we got alot of feedback about it requiering a Farm administrator to install and that it should be a Sandboxed solution.

Is there a best practice here? Is there any way we could have gotten the functionallity with a sandboxed solution (talking to a REST API outside the internal network)?

The thought is that we supply this "SharePoint client" as a free download for our customers. How to we best supply this? As an MSI installer?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

In general, the sandbox process prevents you from accessing data outside the site collection where the solution has been deployed. This means that you can’t access the Internet to make Web service calls directly.

To make WCF calls from Sandbox solutions, you have to create a full trust proxy (using SPProxyOperation). This will anyway require GAC deployment and hence does not meet your customer expectations.

So the options (that don't require deployment by Farm admins) are :

1)Create a Silverlight webpart like here which can be delivered as 100% Sandbox solution

Or

2) Use jQuery\ajax to make service calls, check this out.

By the way, Sandbox Solutions are deprecated in future SharePoint versions(SP 2013). In case you want your solution to be easily upgradable(to SP2013 and above),better to keep away from Sandbox.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.