If you want to make sure that you aren’t using any of the restricted APIs before you deploy your solution to a sandbox environment, manually reference your project against: [SharePoint Root]\UserCode\assemblies\Microsoft.SharePoint.dll If your code compiles, then you’re pretty safe! NEVER DEPLOY code with this Microsoft.SharePoint.dll reference, instead reference the Microsoft.SharePoint.dll in [SharePoint Root]\ISAPI folder. From the [...]
Archive for the ‘Software Development’ Category
SP2010 Sandbox Development Tip
Posted in Software Development, tagged SharePoint 2010 on December 13, 2009 | 1 Comment »
Debugging SP2010 Sandbox Code – Short and Sweet
Posted in Software Development, tagged SharePoint 2010 on December 13, 2009 | 1 Comment »
If you find yourself in a situation when you need to attach to a process from VS 2010, to debug, and you’re code is running in a “sandbox”. You need to attach to the process SPUserCodeService.exe, not w3wp.exe. SharePoint 2010 hosts sandbox code in a secure service – the user code service – so it [...]
Development Setup for SP2010
Posted in Applications, Software Development, tagged SharePoint 2010 on October 19, 2009 | Leave a Comment »
Some important points to remember when developing against SP2010: Make sure your Visual Studio project is set up for .NET 3.5, not .NET 4.0 Run Visual Studio as an Administrator to load debugging symbols Make sure your project is set to compile for Any CPU or x64 (not x86 by default), otherwise your code will [...]
Balsamiq Mockups makes for easy UI design
Posted in Applications, Software Development, Web Sites, tagged UI Design on August 12, 2009 | 1 Comment »
We’ve been using Balsamiq Mockups for some time at my day job, but until recently I hadn’t used the tool heavily on any of the projects I’d been working. Today I needed to shell out an example search results page for a project I am architecting in SharePoint. Think of Balsamiq Mockups as Visio for [...]
Ctrl-F Crash in Visual Studio
Posted in Everything, Software Development, tagged Resharper, Visual Studio on May 11, 2009 | Leave a Comment »
I have Resharper 4 installed into Visual Studio 2008. On 64-bit the CTRL-F functionality crashes the application, which has driving me nuts. My colleague Anand posted a solution to our company Intranet, so I stole his post for my blog for future reference. Thanks Anand ;) “Visual Studio might crash when using the Find feature [...]
Efficient way to add a new item to a SharePoint list
Posted in Everything, Software Development, tagged Microsoft SharePoint on February 25, 2009 | 14 Comments »
Never use SPList.Items.Add because this approach gets all items in the list before adding a new SPListItem. Use the following method instead, which does not preload the list items: 1: /// <summary> 2: /// More efficient way of adding an item to a list. 3: /// </summary> 4: /// <remarks> 5: /// GetItems with a [...]
SharePoint Development Best Practices (Summary)
Posted in Everything, Software Development, tagged Microsoft SharePoint on February 20, 2009 | 8 Comments »
I’ve read several blog posts of late regarding best practices for developing SharePoint API based components. Some developers are aware of issues surrounding disposal of SPSite and SPWeb objects and the use of SPList Item collections, and some are not. The simple fact is the SharePoint API is not intuitive when it comes usage of [...]
Authentication failed because the remote party has closed the transport stream
Posted in Everything, Software Development, tagged Microsoft SharePoint on January 19, 2009 | Leave a Comment »
If you receiver the error "Authentication failed because the remote party has closed the transport stream" when accessing "Search Settings" in the SSP, the following steps will resolve the issue. The issue is a result of incorrect self-serving-certificate. 1. Install the IIS 6.0 Resource Kit on the index server (http://www.microsoft.com/downloads/details.aspx?FamilyID=56fc92ee-a71a-4c73-b628-ade629c89499&DisplayLang=en) 2. Assign a new SSL [...]
Recycle IIS App Pool from Script
Posted in Everything, Software Development, tagged ASP.NET, Microsoft SharePoint on November 7, 2008 | 1 Comment »
My colleague, Carlos Fernandez, sent me this CSCRIPT command for recycling the an IIS application pool: %windir%\system32\cscript.exe c:\windows\system32\iisapp.vbs /a "SharePoint – 80" /r Tired of manually recycling the app pool each time you make a code change to your SharePoint web part? No problem, add the following command to the post build events in Visual [...]
Debugging SharePoint, which Process?
Posted in Everything, Software Development, tagged Microsoft SharePoint on October 28, 2008 | Leave a Comment »
When developing 3rd party components for SharePoint you cannot avoid debugging. Debugging usually involves attaching to a W3WP.EXE process – IIS host for a SharePoint application, from within Visual Studio. When presented with the attach to process dialog box, you should typically see two to three instances of W3WP.EXE, one for central administration site, maybe [...]
