Sunday, June 30, 2013

SharePoint 2010 ULS Logging - C#

I want to share the ULS logging code that I have planned to use from now.
The credit goes to: http://msdn.microsoft.com/en-us/library/gg512103(v=office.14).aspx

Sample code for how you can use it:
UlsLogging.LogInformation("This is information message");
UlsLogging.LogInformation("{0}This is information message","Information:");

UlsLogging.LogWarning("This is warning message");
UlsLogging.LogWarning("{0}This is warning message", "Warning:");

UlsLogging.LogError("This is error message");
UlsLogging.LogError("{0}This is error message","Error:");

Wednesday, June 26, 2013

SharePoint and MS Office Integration issue on development server

I could not save MS Word document to SharePoint 2010 Foundation site document library. I was getting error message "Could not open http://XXXXXX"
I had Windows Server 2008 server and after struggling for an hour and got is resolved by adding Feature "Desktop Experience" to server.

This Microsoft Support link helped me: http://support.microsoft.com/kb/955377
You should check the "Resolution" section on that page.

You can also check this link in other case: http://support.microsoft.com/kb/2625462

Hope it will help someone.

Monday, June 3, 2013

C# code to make string title or proper case

I was doing some testing and needed to create a title or proper case so wrote the following code and wanted to share.