Geeks With Blogs
Hani Amr Sharepoint 2010
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 ......

Posted On Wednesday, October 31, 2012 1:45 PM

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 ......

Posted On Wednesday, October 31, 2012 1:37 PM

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, ......

Posted On Wednesday, October 31, 2012 1:30 PM

Adding "Last Page" link to Data Form Webpart
Hello, I've been playing around with paging in data form webpart. I thought ( well someone actually asked me ) about how to add a "Last Page" link to the paging in the webpart. So, I've not tested it a lot, but it may help. Add this xsl variable inside the ms-paging td: <xsl:variable name="PagesNumber" select="ceiling($dvt_RowCount div $RowLimit)"/> And add this anchor tag in the place you want it to be: <a> <xsl:attribute name="href"> javascript: <xsl:value-of select="ddwrt:GenFireServer... ......

Posted On Tuesday, October 11, 2011 6:16 PM

Disable Automatic Propagation - Variations
Hello, I've been struggling with variations for a lot of time. I always thought that it was a stupid feature in sharepoint because of the conflict it creates. It keeps on updating the page in the variation labels if you update it in the source label, which might not be very useful unless you're using resources heavily and localization. The solution to this, was to disable the automatic propagation from the source label to all other labels, using this snippit: [System.Reflection.Assembly... ......

Posted On Sunday, October 2, 2011 12:12 PM

HttpContext.RewritePath for images/css in Sharepoint 2010
Hello, I've faced a challenging problem during deployment of an HttpModule for a Sharepoint web application that uses the method "HttpContext.RewritePath(pa... to render different CSS/images based on a specific condition that I check on. The strange thing, which I think happens to most of us, is that it was working perfectly on the development environment but on the development environment it's not :( After viewing the IIS logs, I've found out that when I request any CSS/image using this method, ......

Posted On Sunday, October 2, 2011 12:02 PM

Deploying FAST: "Failed to communicate with the WCF service"
Hello everyone, I've faced a weird problem when I was deploying FAST for Sharepoint, is that when I search, the results URL is not mapping correctly to the AAMs that I've defined for it. So, When I opened the event viewer, I've found 2 critical errors that keep on occuring every fixed time interval which were: The Execute method of job definition Microsoft.Office.Server.Sea... (ID 75aabb8d-11c6-4d32-9d0d-ec6... threw an exception. More information ......

Posted On Sunday, October 2, 2011 11:54 AM

" Failed to initialize session with document engine " Problem
Dears, Today I've been playing around with FAST search for Sharepoint 2010, and after doing all the installation and configuration steps, it took it too long crawling and without retrieving any results. So, after viewing the event log, I've found that error saying "Failed to initialize session with document engine: Unable to resolve Content distributor". After searching for the error, the resolution was the following: Go to %FastDirectory%\etc\content... and copy the line containing ......

Posted On Tuesday, July 12, 2011 7:26 PM

ListItem.Update Powershell Exception (Cannot take 0 arguments)


I've faced a strange exception when trying to add a list item using powershell. The exception stated that the update method cannot take 0 arguments. Resolution was pretty simple, just make sure that the user running the script is a member of the administrators group in site permissions.


Posted On Thursday, July 7, 2011 2:51 PM

Paging problem in Data Form Webpart SP2010
Dears, I’ve been facing a bug in the paging of the data form webpart which occurs when the asynchronous update is enabled. The issue is that when you click the previous button, then it’ll redirect you to the previous page as it invokes a call to history.back() javascript function. I’ve done some modifications in the XSLT in order to make this work: • Open the code view and search for a <td> that has a class named “ms-paging” and then paste those lines before the starting of the td tag: <xsl:variable ......

Posted On Tuesday, May 31, 2011 3:00 PM

Granular backup/restore in Sharepoint 2010
Dears, I've just recently tried the new feature in SP2010 which is granular backup and restore. In my case, I wanted to backup a list with the data in it and restore to another sharepoint site with the same template and language. So, the steps are very simple: Go to central administration --> Backup and Restore --> Granular Backup --> and choose "Export a site or list" Then choose the list/site that you want to backup and write the path of the backup ".cmp" file, and you can choose to export ......

Posted On Tuesday, May 31, 2011 1:08 PM

Filter Data Form Webpart (DFWP) by Querystring
Dears, I've faced an interesting problem which I think must be resolved in the new version of Sharepoint. It's about filtering a data form webpart with a querystring parameter.Actually, when you provide a querystring it filters correctly, but if not then it'll not return any rows. Which that was not the behaviour that I actually wanted, I needed it to display all rows when no querystring is applied. So, here's what I've done to work it around: 1. Drop a data form webpart on a page in Sharepoint Designer. ......

Posted On Wednesday, May 25, 2011 4:16 PM

Http Modules in Sharepoint 2010
Dears, Another thing I've faced is that I had to do URL rewriting according to a client cookie.So, first thing came into my mind is writing an Http Module to do the job. Here're the steps: Create your Http Module. Build the module and put the dll in the web application's bin folder. Edit the web.config of the web application, go to the <modules> section and add the following: <add name="ModuleName" type="ModuleType" /> That's it, you're done :) Cheers ......

Posted On Wednesday, May 25, 2011 12:24 AM

Turn off Automatic daylight saving in Sharepoint 2010
Hello, I've not been blogging for the past 2 months maybe because of being extremely busy. Anyways, one of the topics that I've faced is that the government in my country decided to not use daylight saving anymore. So, in order to make sharepoint understand this you'll probably have to do it manually like this: Go to edit the timezone.xml file found in \Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG Take a backup in case something went wrong and then search for your city ......

Posted On Wednesday, May 25, 2011 12:13 AM

Automatic Content Publishing
This is one of the very useful powershell scripts that I found for automatic content publishing and approval on sharepoint 2010. It's very useful that it can be recursive on all sub sites in your site collection and easy to use: .\PublishSPContent.ps1 -Url "http://Yoursite" -Recursive $true You can download it from here : http://publishspcontent.cod... ......

Posted On Tuesday, March 29, 2011 4:41 AM

Validate that a Checkbox is checked using javascript
I was facing a challenge yesterday that I was creating a Visual webpart and I wanted to validate the a submit button is only visible if the user checked a "I agree to terms" checkbox. Something was weired that I tested my code on a normal website and it worked perfectly while it had a different behaviour inside the webpart which is whenever I check the checkbox, the button is enabled but it will not fire the validators in client side. It posts back the page and then the validators ......

Posted On Thursday, March 10, 2011 12:05 AM

Farm is unavailable exception
I was faced today by an exception saying that "Farm is unavailable" and the call stack which for sure wasn't useful for diagnosing that type of error. My solution to this error was straight forward and below are the steps that I've followed: 1. Open run and type services.msc 2. Search for the SQL server instance and in my case I've found that it's not running, so simply start it :) After that, refresh the page and everything is normal again ......

Posted On Wednesday, March 9, 2011 11:55 PM

MOSS 2010 Deploy Farm Solution using STSADM
Today, I've been working on deploying farm solutions to another farm and I was surprised that it can only be done using STSADM.exe. Below are the steps that I've done to get it to work : 1. Use the command addsolution and give it the path of the wsp file which was something like that : stsadm -o addsolution -filename C:\MySolution.wsp 2. Use the command deploysolution and give the solution name as a parameter like that : stsadm -o deploysolution -name MySolution.wsp -immediate -allowgacdeployment ......

Posted On Tuesday, March 8, 2011 4:47 AM

FormatDate in Display Item Form Webpart
I've faced an issue that I wanted to display the date in the format of ('MMMM dd') that is retrieved from a sharepoint list in an arabic site collection. So, after googling this issue, I've found out that a possible solution to my poblem is using the function ddwrt:FormatDateTime that can be used as long as you'll include the following namespace xmlns:ddwrt="http://schemas... My purpose was solved by writing this line of code in my xsl code behind for the ......

Posted On Sunday, March 6, 2011 10:46 PM

Copyright © H@Ni | Powered by: