Coding Tips

Since the early times of SharePoint we receive support cases where a customer receives the following error message when using custom code with SharePoint: "The Web application at http://server:port/ could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to […]

Unlike “Before” event (e.g. ItemAdding, ItemDeleting) “After” events (e.g. ItemAdded, ItemDeleted) in SharePoint usually fire asynchronously on a different thread then the http request. That means that the HttpContext and HttpRequest objects cannot be retrieved in these events as they do not exist on the current stack. That means that there is no way to directly […]

One day out and we already have received feedback about a problem with SPDisposeCheck. 😉 Here are the details: Code like the one below is not recommended as it disposes the RootWeb – that is correctly identified by SPDisposeCheck!         public void DND_RootWeb()         {             using (SPSite siteCollection = new SPSite(““))             {                 […]

We are happy to announce the release of a new version of SPDisposeCheck! SPDisposeCheck is a tool that helps developers and administrators check custom SharePoint solutions that use the SharePoint Object Model helping measure against known Microsoft dispose best practices. This tool may not show all memory leaks in your code and may produce false positives […]

Output caching in SharePoint is a powerful method to increase the performance of a site. But out of the box there are only very limited ways to fine tune the caching. Using the Cache profiles it is only possible to control the caching based on query string parameters, http headers and permissions of the current […]

With Powershell we now got a new very powerful scripting language and many products like SharePoint provide their own extensions in form of CmdLets for administration purposes. Customer like scripting languages as it allows them to write custom code without a need to run a compiler or to copy new executables to their production machines […]

ASP.NET webservices use XML 1.0 which restricts the character set allowed to the following chars: [2]    Char    ::=    #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] /* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */ (Source: As you can see several characters below 0x20 are not allowed with […]