SharePoint search is returning 500 internal server error page : Resolved

Recently i was working on a Intranet Portal and most part of it was based on documents collaboration. So to easily find a document i configured search for the site. I created a new content source in existing search service application and crawl the source. It was crawled successfully without showing an error or warning, but when i opened the site in IE i was presented by an 500 internal server error page. I tried one more time and same result, i suspect that there is something fishy in IIS (may be application or app pool is stopped). To my surprise there was nothing like that, i reset the IIS but same result. After checking the log file i found this weird entry.

System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure “Resources.lutron.core.resources” was correctly embedded or linked into assembly “App_GlobalResources.0whxr_of” at compile time, or that all the satellite assemblies required are loadable and fully signed.    at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)     at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)     at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)     at System.Resources.ResourceManager.GetObject(String name, CultureInfo culture, Boolean wrapUnmanagedMemStream)     at System.Web.Compilation.BaseResXResourceProvider.GetObject(String resourceKey, CultureInfo culture)     at System.Web.Compilation.ResourceExpressionBuilder.GetResourceObject(IResourceProvider resourceProvider, String resourceKey, CultureInfo culture, Type objType, String propName)     at System.Web.HttpContext.GetGlobalResourceObject(String classKey, String resourceKey, CultureInfo culture)     at Microsoft.SharePoint.Search.SPSatelliteResourceExpressionBuilder.GetResource(String classKey, String resourceKey)     at ASP._layouts_accessdenied_aspx.__BuildControlltAccessDeniedCaption()

After sometime i opened the site in Chrome and search was working fine there same was with Firefox. So i thought that there is problem with browser not with SharePoint server. After digging in to IE settings i came to know that there wasn’t any default language set for my IE (Might be i removed this for some testing purpose.)

Every user has a search preference inside SharePoint site and it can be accessed through below link.


In this page, by default search language is set as ‘Search using my browser’s language‘. Other option is ‘Search using the following languages (maximum of five)‘. So if the option 1 (default) is selected then there should be a default language set in your browser otherwise you’ll get 500 internal server error.

In case option 2 is selected, then search is not dependent on browser language preference. In my case i just set the browser default language in place of opt for option 2. Below are the steps.

  1. Tools > Internet Options.
  2. Under General tab, click on languages button.
  3. Inside Language Preference window, add a language (in my case it was English (United States) ). If you add multiple languages in this window then the first one will be treated as the default language for browser.

*You can also opt for option 2 mentioned above as per your choice.

Happy SharePointing 🙂


Update custom list’s feature reference | Update custom list’s feature id reference.

Disclaimer: Approach used in this blog post is risky and not recommended. The idea of this post is to just understand the insight and sharing my experience with my blog readers. If still you want to try this for any situation then please do this at your own risk.

We earlier created a custom list using list definitions feature in our site. After one month, we decided that the list definition responsible for list creation had to move to another feature to make the feature as the group of alike lists.

After deployment, we found that list was not being opened and was throwing error. So after digging in to log file, I came to know that list was still pointing to previous feature and now that feature didn’t have the reference for the list schema (As we had already moved the reference to the new feature). I was not ready to take risk of deleting the existing list as it was already contained thousands of referenced items. Deleting the list means to do lots of manual work to fix the functionality and to waste the time and effort.

Now there was only one way that if somehow I could change the reference of existing feature id of list to new feature id. But how that was possible??

I couldn’t found a direct way by using code or Power Shell script to change the feature reference of existing list. So I started analyzing and thought that at least there must be some place where SharePoint keeps this configuration and my mind said content database. Now as you know that SharePoint content database is not a piece of cake to understand and it’s very complex to understand. Everything is based on GUID and referencing is too complex to understand. Due to this complexity, Microsoft doesn’t recommend to touch the content database. But for me there was no other way. So below is how I fixed this issue.

  •  In site content database, there is a table (AllLists) that has all such references. This table keeps the relation information of a custom list and feature related with the list.
  • tp_Title‘ column has the name of list(s) and ‘tp_FeatureId‘ column keeps the feature id related to the specific list.
  • My list name was ‘AnnouncementCategory’ and first I perform the below command.

SELECT *  FROM [AllLists] where tp_Title like ‘%Announce%’

This query gave me all related lists result set. After analyzing the result set I came to know that all other related lists are pointing to same feature id but the problematic list was pointing to different feature id (The previous feature).

  • Now I decided to update the feature id value to see the difference. I noted down the current feature-id value at notepad (In case to revert back the changes) and execute below mentioned update command to update the feature id.

update AllLists set tp_FeatureId=’xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx’ where tp_ID like ‘%xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx%’

tp_FeatureId : This is the feature id of new feature that contains the reference of the existing list. You can get this from your code file (Feature.xml) or from 14 hive (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES).

tp_ID : This is the unique id column in the AllLists table to identify a specific record.

  • After running this command, when I tried to open the problematic list then to my surprise it opened without any error. After that I performed some testing on the list to verify that whether everything is working fine or not.
  • Testing included adding/updating/deleting/content migration and lookup references of list.

For me after spending a couple of hours, it was like bingo. Happy Share Pointing 🙂

Remove orphan feature(s) entry from SharePoint’s ManageFeatures.aspx

At times we need to get rid of feature(s) from SharePoint farm, those are no longer required. This is kind of cleaning and managing your SharePoint Farm. Most of the time due to inappropriate procedure or by using a 3rd party tool, Feature gets removed but it still displays on Feature.aspx page. When you try to search this feature through PowerShell or by tool, this feature becomes unavailable.

The simple reason of this is that it gets degraded and loose its scope and it has an orphaned entry in database.

So below are the steps to resolve this i.e. to clean up the feature reference from ManageFeature.aspx page.

  • First of all open ManageFeature.aspx and copy the title of the feature that needs to be removed from the page. Paste the title in a notepad file (To remove any formatting or extra space while copying the title).
  • Open SharePoint Management Shell as an administrator.
  • Run below commands:

$feature = Get-SPFeature | ? { $_.GetTitle(1033) -eq “Orphaned feature name” }


Happy SharePointing !

PeoplePicker not showing FBA users (Claims Based Authentication)

Recently i faced an issue in a SharePoint site while i was trying to add a FBA user in a site group. On searching the user in people picker, it was not showing the FBA user(s) to select. Every time i searched the FBA user(s) through people picker, it returned me only user(s) from AD. I searched Google but no clear instructions on how to resolve this issue. Finally after some R&D, i was able to resolve this. So i thought to pen it down step by step for you guys. Here are the steps.

First we need to know the values of ‘Membership Provider’ and ‘Role Manager’ of web application.

1. Navigate to Central Administration > Application Management > Manage web applications (Under Web Applications section)
Directly navigate to http://<CA URL>/_admin/WebApplicationList.aspx

2. Select web application (That’s need to be configure for FBA users search.).
3. Click on Authentication Providers from ribbon.
4. Inside Authentication Providers pop up, Click on ‘Default’ hyperlink under zone column.
5. On Edit Authentication Modal popup page, go to Claims Authentication Types.
6. Note down the value of ‘ASP.NET Membership provider name’ and ‘ASP.NET Role manager name’.
7. Exit from the CA.

Make entries in web.config of application.

1. Open web.config file inside ‘C:\inetpub\wwwroot\wss\VirtualDirectories\<Application Folder>’ folder.
2. Search for ‘<PeoplePickerWildcards>’
3. Now add values of ‘Membership Provider’ and ‘Role Manager’ in this section as shown below.
<clear />
<add key=”<Your Membership Provider Value Goes Here>” value=”%” />
<add key=”<Your Role Manager Value Goes Here>” value=”%” />
4. Save and close the web.config.
5. Now find FBA user through people picker and it will work.

Happy Share Pointing 🙂

Download Files/Images from SharePoint Libraries using PowerShell

I consigned a task to backup all files inside different document libraries of a SharePoint site on hard disk. We need to reorganize the entire site and this site comprises so many document libraries. So downloading documents one by one is a gigantic task as the site has gigs of docs. Alternative option is to open libraries in explorer and start copying them to a place, but this methodology has so many limitations e.g. network speed, installation of office components, much time required etc.
I want to get this job done hastily. So for a moment I thought of Power Shell. I want to give it a try and trust me by using this I was able to download gigs of documents within minute. Below is the code snippet for your reference:


######################## Start Variables ########################
######################## Download Files Script######################
$destination = $args[0]
$webUrl = $args[1]

# Replace actual document libraries name with DocLib1, 2, 3 etc.

$web = Get-SPWeb -Identity $webUrl

foreach($listUrl in $listUrls)
$list = $web.GetList($webUrl+”/”+$listUrl)

function ProcessFolder {
    $folder = $web.GetFolder($folderUrl)
    foreach ($file in $folder.Files) {
        #Ensure destination directory
        $destinationfolder = $destination + “/” + $folder.Url
        if (!(Test-Path -path $destinationfolder))
            $dest = New-Item $destinationfolder -type directory
        #Download file
        $binary = $file.OpenBinary()
        $stream = New-Object System.IO.FileStream($destinationfolder + “/” + $file.Name), Create
        $writer = New-Object System.IO.BinaryWriter($stream)

#Download root files
#Download files in folders
foreach ($folder in $list.Folders) {


Copy this to a notepad file and save with extension .ps1 E.g. DownloadFiles.ps1

Open SharePoint Management Shell 2010; navigate to the path of script. Provide destination path as argument 1 and site URL as argument 2 as shown below.  

.\DownloadFiles.ps1 “d:\documents” http://mySite

*This will create separate folders for each document library with library name.


Search Crawling Error “The filtering process could not load the item…” in SharePoint 2010 : Resolved

“The filtering process could not load the item. This is possibly caused by an unrecognized item format or item corruption.”
In our production server this warning was generating with many items while crawling sites for search. Due to this we were unable to find the content of our custom pages during search. After a long period of time we could get the actual issue. We tried each and every settings related to search in Share Point server with no luck. We also goggled a hell lot of topics regarding this but couldn’t resolve this. While goggling i found some interesting links those says that this issue comes due to the missing or corrupt installation of pdf iFilter. Though we don’t have any pdf document anywhere on the site even then we installed the pdf iFilter correctly two times with no luck. More interesting thing was that this error was generating for Share Point server’s default pages like AllItems.aspx etc. This search crawling was running successfully on all other servers. So where was the actual problem ?
Problem: While upgrading this server a Microsoft Office 2010 update corrupt the Filter Packs of this server and this corruption was causing the crawling issue. Generally people aware of pdf iFilter but apart from this iFilter there are other filters installed too for smooth processing of search crawling and they were corrupted however in our case.
Resolution: I just download the Microsoft Office 2010 Filter Packs (64 bit) and reinstall them again. After that reset the search index and crawl again and voila i got my search crawling smooth without any warning and errors. Everything worked fine after that. Download link for Microsoft Office 2010 Filter Packs is mentioned below:
Enjoy… Happy SharePointing 🙂 ….

Set Welcome Page using PowerShell : SharePoint 2010

By default a SharePoint 2010 publishing site uses default.aspx as its welcome page. There are so many conditions where we use our custom web part page as the default page for our publishing site in place of general default.aspx. The best example for this is an application dashboard as the default page. Though its very easy to set the welcome page in a SharePoint site by navigating to Site Settings and under Look and Feel section click on Welcome Page.

Now the question is why i wrote power-shell script for such a simple task.

Answer 1: I want a one click deployment solution for my custom code that includes features, event receivers, web parts etc. I don’t want to remember steps, just i run a batch file and execute everything inside from that batch file.

Answer 2: In my solution i have custom pages and i wrote the deployment script to create those pages. During development if we change any page for java-script, CSS etc. then we need to redeploy the pages to check the implementation. So we need to delete all pages first and then redeploy them otherwise pages so the double instance of each web parts inside that. Well we know that you can’t delete a page directly that is set as welcome page in SharePoint site so in this case you need to set another page as welcome page first then delete the page you want to. So during my development cycle this was very irritating that before deployment of my custom pages i need to first  set Under_Construction.aspx page as my welcome page then delete my actual welcome page then deploy custom pages and then again set the actual page as welcome page. What is your machine is slow and after any deployment it runs pathetically slow..

Oh my god it sucks.. So for all this i wrote a script to set welcome page so that before and after the deployment of pages i could run this and rest of the work it do automatically. So below is the script:

Add-PsSnapin Microsoft.SharePoint.PowerShell
$web=Get-SPWeb -Identity “http://kailash1689new:9007&#8221; -AssignmentCollection $assignment
Stop-SPAssignment $assignment
Write-Host ‘Welcome Page Set Successfully…’
Write-Host ‘Press any key to exit…’

Hide View All Site Content and Recycle Bin in Quick Launch SharePoint 2010: Resolved

When I worked on MOSS 2007 I wrote an article regarding Hide View All Site Content and Recycle Bin in Quick Launch: Resolved and this article is one of the most popular article @ my blog.

But that article was suitable only for MOSS 2007. As there are lots of changes from MOSS 2007 to SharePoint 2010, so that article can’t be applied on SharePoint 2010.

One blog surfer told me regarding this and then i decide to dig out that how will we achieve same thing in SharePoint 2010. So after doing some research I could make it happen in SharePoint 2010. Below are the steps to achieve this:

1. Open Notepad and paste following style inside the notepad file:


.s4-specialNavLinkList {




2. Now save this text file on your system.

3. Open the site where you want to hide Recycle Bin and All Site Content links and upload saved text file in to a document library.

4. After uploading the file click on the name of the file inside document library. Now a dialog box will open and ask for Read Only or Edit Mode.

5. Just select Read Only mode and ok.

6. Text fill will display inside browser. Copy the URL of text file from address bar of browser.

7. No open SharePoint 2010 page where you want to hide Recycle Bin and All Site Content Links.

8. Put Page in edit mode and add a Content Editor Web Part (This web part is inside Media and Content Category in SharePoint 2010) inside the page.

9. Now click on Edit Web Part from context menu.

10. Inside Content Link text box paste the URL u copied earlier in step 6.

11. Click on Ok and you are done.

Happy SharePointing 🙂

Add Safe Control Entries to SharePoint 2010 Web Parts using VS2010

I was reviewing a SharePoint solution and found that a web part inside that solution has poor naming conventions so I decide to rename the web parts for giving the proper names to them.

I changed the necessary references in different files of web part (I’ll mention them in a separate blog post). Now after renaming the web part I deployed it on site and then tried to add it in a web part page and it simply throws me the error.

Type is not registered as safe“. Well at first glance I decided to see me safe controls entries inside my site’s web.config file and I was right that namespace part was wrong in web.config file. It was pointing to earlier namespace and class name. Humnnnn so if I changed this entry manually then it works fine but I need to automate the deployment process and I wanted to write the correct safe controls entries inside web.config whenever we deploy the web part. Well so question arises where to set my safe control entries inside my SharePoint solution. Well after analysing that I came to the solution. So below are the steps described for that:

1. Open your SharePoint web part project inside visual studio 2010.

2. Select the web part folder for which you want to change the safe control entries in web.config file.

3. Press F4 to open properties window (I am not talking here for property page.).

4. In properties windows there is last entry of properties displaying as “Safe Control Entries

5. Click on the eclipse sign in front of “Safe Control Entries” value.

6. Inside “Safe Control Entries” pop up window, check for Namespace properties inside SafeControlEntry1 properties panel.

7. Change value of namespace property according to your namespace and class and click ok.

8. Save and build the solution and deploy it again.

9. Now after successful deployment check web.config of site and voilà you’ll find the correct safe type entries of your web part.

Happy Share Pointing J

Microsoft made the excellent integration of SharePoint with Visual Studio 2010. Good to see that.

In my next blogs I’ll come with these types of enhancements that visual studio provides for SharePoint 2010.

Installing assembly in GAC in Windows Server 2008 : Resolved

I developed an event handler and need to deploy it on production server. My production server is built on Windows 2008 Enterprise Server 64 Bit and there was only one installation on server i.e. SharePoint Server 2010. Now I need to install my assembly in to GAC. I copied my .dll to production server. Then I opened c:\windows\assembly and drag drops my assembly in to GAC (c:\windows\assembly folder). But nothing happened and my assembly couldn’t install in GAC 😦

Drag and drop was not working. So second alternative was to use gautil.exe to install the assembly inside GAC but as it was production server so there wasn’t any installation of visual studio and hence there was no SDK installed therefore there wasn’t such exe like gacutil.exe. Again that was a problem. Now I worked on why drag and drop is not working. I searched here and there and follow some articles but nothing helped me. I disable UAC and restart server but it doesn’t work. I opened console and explorer using run as administrator but nothing helped me. Then I copied gacutil.exe file from my development machine to production server but I couldn’t run it (Though lastly this technique worked for me).So finally I resolved this issue and below are the directions for how to resolve this?

1. First check that if production server is of 32 bit or 64 bit?

2. If it is 64 bit then open folder “C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64

But if it is 32 bit then open folder “C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin

3. Copy 2 files i.e. gacutil.exe & gacutil.exe.config

4. Paste these files to any location of production server.

5. Your gacutil.exe is now ready to run and u can install assembly in to GAC using this small utility.

 Points to Remember

* When you drag and drop assembly in GAC it won’t give proper error messages (Like targeting framework error) if it has any so better to use gacutil to install assembly.

* gacutil.exe doesn’t run standalone rather it needs a configuration file to run i.e. gacutil.exe.config