SharePoint 2010 slow page response time suddenly !


Hello,

One of my customers faced a problem that suddenly their SharePoint portal was loading extremely slower than usual. After some basic troubleshooting I did not find anything suspicious in the ULS logs, IIS logs or even Event logs.

After that, I came to the part that I like most which is capturing a memory dump for the IIS process and analyzing the threads running. I searched for any common mistakes like looping a large list, calling a remote web service but couldn't find any.

After a deep analysis of the memory dump (Which was done by an Escalation Engineer for SharePoint), it seems that the farm root certificate was missing and therefore was trying to validate it from the internet every time the user requests to load the page and this was the resolution http://support.microsoft.com/kb/2625048

Cheers, 

author: H@Ni | Posted On Wednesday, October 31, 2012 1:45 PM | Comments (0)

Open in explorer view not working SOMETIMES !!


Hello,

As weird as it seems to anyone who used it before, most of the time explorer view does not work until some steps to be followed, but in my case it was working and sometimes randomly not working !

After spending hours of troubleshooting and collecting logs, Network traces, Fiddler traces, etc. I reached the solution from the Network trace.

Although it seems strange, it was sending a PROPFIND request to the root directory "/" which was actually deleted. So, I came up to this important article that states that you must have a root site collection in your SharePoint web application in order to keep it in a supported state.

http://support.microsoft.com/kb/2590564

And actually that explained it and solved the strange behavior as well.

Cheers,

author: H@Ni | Posted On Wednesday, October 31, 2012 1:37 PM | Comments (0)

SharePoint Database security corruption


Hello,

One time I faced an issue where my customer is having an HTTP 500 internal server error while trying to access any SharePoint site. The problem appeared once he moved back and forth with inheriting/breaking inheritance of permissions over different levels in the site collection.

"Security corruption in database" sounds very tough for a customer running a production portal with a backup that can make him lose around 3 weeks of valuable data.

However, the solution tends not to be that hard, there's an stsadm command that help us detect the corruption and even delete the orphaned items causing the corruption.

Follow these steps:

a. stsadm -o databaserepair -url http://SITEURL -databasename DBNAME
                and it returned some orphaned items.
            b. stsadm -o databaserepair -url http://SITEURL -databasename DBNAME -deletecorruption
                and it removed the orphaned items.

Cheers,

author: H@Ni | Posted On Wednesday, October 31, 2012 1:30 PM | Comments (0)

Playing sounds in WPF


I think playing sounds in a WPF could not be easier than this:

using

System.Media;

SoundPlayer

player = new SoundPlayer("Assets/type.wav");

player.Play();

And that's it :)

author: H@Ni | Posted On Wednesday, April 25, 2012 9:08 AM | Comments (1)

Accessing controls in DataTemplate for Listbox in WPF


Hello,

I've been searching around on how to access controls that are in DataTemplate for the listbox items in WPF and I came through this post that explained it all in an easy way.

Regards,

author: H@Ni | Posted On Wednesday, April 25, 2012 9:05 AM | Comments (0)

CSS Hassle for different browsers


Even been into the hassle of an HTML table displaying differently on different browsers ? of course every UI developer have been into it. I've found a very interesting solution to this problem.

Suppose that you have a CSS class called "TableLayout" and you want this class to have different attributes according to the client browser.

You only need to write it like that in the CSS file:

.ie .TableLayout

{

   margin-left: 15px;

}

.webkit .TableLayout

{

   margin-left: 0px;

}

This is very simple as it defines this class for Internet explorer to have a left margin of 15px, and for webkit browsers (like google chrome for example) to be with no left margin.

Final step is to include the following javascript into your page:

<script src="css_browser_selector.js" type="text/javascript"></script>

and that's it :)

For downloading the script go to this link

Cheers,

author: H@Ni | Posted On Tuesday, April 24, 2012 11:23 AM | Comments (0)

Preventing faulty callbacks to ruin your WCF service


Hello,

I had a problem in one of the tasks, that is when using callbacks with WCF service sometimes the callback faults and causes your service to hang or timeout the request.

The solution to this was to callback your client in a different thread and catch the exception, and then return it to the application in a nice way.

Here's an example for this:

private void YourMethod()

{

   //... Do work

   //Time to callback one of the clients

   

BackgroundWorker workerThread = new BackgroundWorker();

workerThread.DoWork += new DoWorkEventHandler(workerThread_DoWork);

workerThread.RunWorkerAsync(callbackObj);


}

static

void workerThread_DoWork(object sender, DoWorkEventArgs e)

{

ICallBackContract callback = e.Argument as ICallBackContr

try

{

   callback.CallClientMethod();

}

catch

{

   //Do your error handling then

}

}

Cheers,

 

author: H@Ni | Posted On Tuesday, April 24, 2012 10:54 AM | Comments (0)

WPF Notify Icon


Ever wondered how you can create a notify icon that is displayed in task bar and can popup some notifications in your WPF application ? If you do, here's an excellent project that can help you get your task done :).

Cheers,

author: H@Ni | Posted On Tuesday, April 24, 2012 10:44 AM | Comments (1)

WPF Themes


Hello,

I was developing the past days a WPF application and I've always dreamed about starting to learn how to create a wonderful looking application with animations and colors that may one day make it look like this famous hospital application that was introduced by the announcement of WPF in every event by Microsoft :) (here's a screenshot of it). So, I may not have reached the same look and nice animations, but I've found a very interesting project on codeplex that can make you theme your application in no time and continue designing it with your imagination.

Link to codeplex project

Cheers,

author: H@Ni | Posted On Tuesday, April 24, 2012 10:42 AM | Comments (0)

Set DispatchRuntime.AutomaticInputSessionShutdown to false "WCF Exception"


Hello everyone,

Been a while since my last post. I've had a weird exception that causes the WCF service proxy not to respond after a certain time (10 mins I guess), so thanks to this post I figured out the solution.

Solution that worked for me was to enable reliable session on the client application's config file and service host's config like this:

<reliableSession enabled="true" inactivityTimeout="00:20:00" />

and that lead to increase from 10 mins to 20 hours :)

Cheers,

author: H@Ni | Posted On Tuesday, April 24, 2012 10:34 AM | Comments (1)