SharePoint Blog – René Hézser

Getting the PageTitle

Getting the PageTitle of a page should be just a property away would you think. I would call Page.Title to get the title of the current page. Unfortunately Page.Title contains “\r\n           ” and the title of the page is in a new line, like this:

The property will only return the first row, which…

Treffen der SharePoint Usergroup OWL am 9.12.14

Am 9.12. ist es wieder soweit. Derzeit sind zwei Vorträge gesetzt: SharePoint Hosting – Ist die Cloud schon geeignet dafür? von Daniel Lindemann (ITaCS GmbH) Das Spannungsfeld Development-Operation im Umfeld von SharePoint Hosting von Andre Tomasiewicz (arvato Systems) Wir treffen uns um 18h. Die Adresse lautet: An der Autobahn 200 33333 Gütersloh https://www.google.de/maps/dir//51.8841959,8.4429219/@51.8834721,8.4421559,17z?hl=de Da der…

.NET goes OpenSource!

Das sind doch mal hervorragende Neuigkeiten! Microsoft hat im Rahmen seiner Online-Konferenz connect(); am Mittwoch bekannt gegeben, dass das komplette .NET Framework zukünftig als Open-Source-Software unter der MIT-Lizenz stehen wird. Quelle: http://www.heise.de/newsticker/meldung/Microsoft-NET-wird-komplett-Open-Source-2452033.html Das freut mich als Entwickler natürlich sehr. Dann können meine PI’s bald noch mehr durch Mono Bisher wird per USB/RS232 der Stromzähler über…

Why I prefer WebApplication deployments over GAC deployments

This article is written with scope on SharePoint 2013. With SP 2013 the default TrustLevel in the web.config is set to “FullTrust”. On previous version the value is “WSS_Minimal”. When you develop Farm-Solutions for SharePoint, you can deploy assemblies to the Global Assembly Cache (GAC) or configure the solution for a “bin-Deployment”. The bin-way puts…

Creating a lookup field via elements.xml

This is another post to help me remember. And as a reference for all of you, who cannot remember how to create a SPFieldLookup via XML.

When you provision a SPField via features, do not forget to add Overwrite=”TRUE”! Otherwise you’ll get an exception like this: <nativehr>0x8107058a</nativehr><nativestack></nativestack>Fehler beim Binden des Inhaltstyps ‘0x010200C7A18EB120BB4A00892E9E1EE9481C9B0067E475B6FDD54048B347370871443CAD’ an die…

What is Dependency Injection?

This post will help you understand what DI (Dependency Injection) is, and how easy you can adopt the design patterns to create flexible and testable code. For a definition take a look at this Wikipedia article. From the three types of Dependency Injection constructor injection setter injection interface injection this post covers the interface type.…

ChangePassword Webpart – new version available

The ChangePassword WebPart on CodePlex has been downloaded over 20.000 times. The new version has a couple of new features: Easy Installation SharePoint 2010 and 2013 (Foundation and Server) Password strength indicator Plugin support to extend functionality by custom code1 Warning if an unsecured connection is used Copyright hint can be removed1 Auditing of password…

Using TLS with SmtpClient

A rather small change to your code can increase security by sending E-Mails via an encrypted connection. Recently I stumbled across code, that send E-Mails with the System.Net.Mail.SmtpClient class. That piece of code did not try to communicated encrypted with the receiving SMTP server. So I changed that, to enable a TLS connection.

The…

Useful JavaScript to know when working with SharePoint Display Templates

This post has some really great examples for JavaScript helper methods and available properties for working with Display Templates in SharePoint 2013. http://dotnetmafia.com/blogs/dotnettipoftheday/archive/2014/02/26/useful-javascript-for-working-with-sharepoint-display-templates-spc3000-spc14.aspx If you ever had to decide if your script is running on a SharePoint Foundation, use this one:

SharePoint App Deployment fails

Visual Studio does not tell you much if an app deployment fails. Fortunately SharePoint will log more information about the problem that occurred during the app deployment in the ULS-Log. So if you run into the “There were deployment errors.” exception, take a look at the ULS-Log. In this particular case SharePoint didn’t like my…

Speed up SharePoint Update Installation

Installing Updates for SharePoint 2013 will take a long time, if you don’t disable some services prior starting the update process by executing the hotfix exe file. To simplify the installation, and speeding it up, you can use a PowerShell script to stop the necessary services, and start the update. http://blogs.msdn.com/b/russmax/archive/2013/04/01/why-sharepoint-2013-cumulative-update-takes-5-hours-to-install.aspx You need to copy…

SQL Access to Configuration DB required

In many cases you pass an URL string to connect to SharePoint. In my case I wanted to verify the URL by using this code: 1: Uri requestUri; 2: if (!Uri.TryCreate(absoluteUrl, UriKind.Absolute, out requestUri)) 3: throw new ArgumentException(absoluteUrl + " is no a valid URL."); 4: 5: SPWebApplication webApplication = SPWebApplication.Lookup(requestUri); And here comes the…

Cleanup your VMs from old Updates

Windows Update leaves lots of files, which you don’t need anymore. The Disk Cleanup utility lets you remove those files. Unfortunately the tool needs to be “installed” on Windows Server 2008 and 2008 R2. There is a Guide over here –> http://technet.microsoft.com/en-us/library/ff630161%28WS.10%29.aspx Instructions for Windows Server 2012 are within the comments of the linked article.