Questions tagged [sandbox-solution]

A sandbox is a restricted execution environment that enables programs to access only certain resources in a controlled way

A sandbox is a restricted execution environment that enables programs to access only certain resources, and that keeps problems that occur in the sandbox from affecting the rest of the server environment. Solutions that you deploy into a sandbox, which are known as sandboxed solutions, cannot use certain computer and network resources, and cannot access content outside the site collection they are deployed in.

Questions having the sandbox solution tag refers to the development and implementation of sandbox solutions.

Reference: http://technet.microsoft.com/en-us/library/ee721992.aspx

381 questions
22
votes
3 answers

How to check if code is running as sandboxed solution?

Is it possible to check, from within solution, if it was deployed as sandboxed or not, e.g. something like this: if(this.IamSandboxedSolution) // do something else // do something else
Toni Frankola
  • 4,319
  • 28
  • 38
5
votes
3 answers

code behind aspx pages in sharepoint sandbox solution

I have a custom aspx page in sharepoint sandboxed solution with the content as shown below? <%@ Page Language="C#" MasterPageFile="~masterurl/default.master"…
sharmila
  • 593
  • 1
  • 8
  • 19
4
votes
2 answers

SharePoint 2010 Sandbox Solution - Cookies support

In SharePoint 2010 Sandbox solution, whether cookie is supported? When I'm trying to set cookie by HttpCookie myCookie = new HttpCookie("Test","Hello"); HttpContext.Current.Response.Cookies.Add(myCookie); The value is not passed to browser and the…
Mac
  • 178
  • 7
3
votes
2 answers

Sandboxed code execution request failed

I am able to deploy other Sandbox Solution from Visual Studio 2010 but in one solution I am getting below error: Error occurred in deployment step 'Add Solution': Sandboxed code execution request failed. In this solution I have added Feature…
3
votes
3 answers

Sandbox Solutions, resetting the quota

I'm looking into the possibility of developing sandbox solutions (mainly web parts) for our SharePoint 2010 internet site. One thing that I keep reading is that if the quota is exceeded, then all sandbox solutions within the site collection will…
Mark Bell
  • 273
  • 4
  • 12
2
votes
1 answer

sandbox solution priviliges issue

I have a sandbox solution for SharePoint 2013. (because it has to work in Office365) I have an eventreceiver that adds an item to a list. I don't want users to manually change that list, so I don't give them rights on that list. However the…
Marlou
  • 1,130
  • 1
  • 13
  • 32
2
votes
2 answers

Sandbox Unhandled exception was thrown. Partial Trust app domain:

I'm trying to build my very first SP (2010) Sandbox project (I'm generally new to SP anyway!) but I keep hitting the following "infamous" error when I try and add any of my custom Web Parts to a page:- Unhandled exception was thrown by the sandboxed…
James Buckingham
  • 185
  • 1
  • 2
  • 12
2
votes
0 answers

Steps for troubleshooting Sandbox web part "An error occurred while attempting to add the item to the page"

I have a server which is refusing to run any Sandbox web parts with the error "An error occurred while attempting to add the item to the page" Steps already performed :- These web parts run fine on other servers. Normal non-sandbox web parts work…
Ryan
  • 5,835
  • 8
  • 28
  • 54
2
votes
2 answers

Write file to response problem

I am having trouble writing a file to the response stream (sandbox solution). The final line of this code block throws a null reference exception. HttpContext.Current.Response.Clear(); HttpContext.Current.Response.AddHeader("content-disposition", …
user1786107
  • 783
  • 4
  • 12
  • 33
2
votes
1 answer

Install sandbox solution to SPWeb

I need to install a sandboxed solution to my site (SPWeb). However I am not a site collection administrator, and therefore cannot access the solution gallery that exists at the site collection level. I am a site (SPWeb) administrator though. How can…
Kyle
  • 352
  • 2
  • 12
2
votes
1 answer

Unsandboxing a solution gives a Web Part Error

I'm extremely new to SharePoint and most definitely not our company's SharePoint dev. They set me up with a WebPart and its project where I can write some code. The page was working perfectly fine when in a Sandbox. I needed to unsandbox it, so I…
2
votes
2 answers

Debug custom sandbox workflow action

How to debug the custom sandbox workflow actions in VS2010? The sandbox workflow actions created following the steps in http://msdn.microsoft.com/en-us/library/ff798499.aspx
Mac
  • 178
  • 7
2
votes
1 answer

Attach file to list in Sandbox Webpart

I am trying to create a custom control for updating a List on a Sharepoint site that only allows Sandbox Solutions to be added. I've read a few threads on uploading attachments, but they all seem to involve doing it from the server machine (Using a…
Wesley
  • 707
  • 7
  • 18
1
vote
0 answers

when on click try to create subweb, it gives me error

This function works fine, SP.SOD.executeFunc('sp.js', 'SP.ClientContext', loadCurrentWeb); but when I put it in, function AddNewSubWebNow() { SP.SOD.executeFunc('sp.js', 'SP.ClientContext', loadCurrentWeb); } it gives me, Unexpected response…
Mathematics
  • 1,753
  • 5
  • 28
  • 56
1
vote
1 answer

Activate sandbox solution programmatically sharepoint 2013

I'm trying to activate a sandbox solution on SharePoint 2013 using C#. This is the code that I am using, it's working and the solution is activated however the files in the solution are not copied to the Style Library. SPSite tempSite = new…
Joao Ferreira
  • 950
  • 7
  • 14
1
2 3