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.

http://My_SharePoint_Site/_layouts/EditUserPref.aspx

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 🙂

Advertisements

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 🙂

Microsoft Outlook Search is Not Working : Resolved

I had Outlook 2010 and I was not able to search any email using search box. Whenever I used to click on search box provided in Outlook, Search toolbar area got grayed out. Even if I tried to search email by putting criteria manually, it didn’t work out for me. Search functionality is the backbone of any system where tons of information is stored.

To fix this issue always look for below options one by one.

1. File > Options. Now in right hand section of ‘Outlook Options‘, click on ‘Search‘.

2. Click on ‘Indexing Options…‘ button. Start indexing your email, so that they could show up in search.

What if ‘Indexing Options…’ is grayed out?

  1. Click on Start > Run in your windows. Or you can press ‘window key + R‘ keys combination.
  2. Type ‘Services.msc‘ and hit enter.
  3. Inside Services console, Select ‘Windows Service‘ and check whether it’s stop or not. If it’s stopped then start the service.
  4. If this service is disabled then first enable this service (Right click the service and then click on Properties. Under General tab, change the option to ‘Automatic‘ in Startup type. Click Ok and then start the service.)
  5. Now check the ‘Indexing Options…’ This should worked now.

 Still have issues. More places to look in to fix this issue.

  1. Click on Start > Control Panel.
  2. Open Programs and Features.
  3. Now click on ‘Turn Windows features on or off‘ (Resides in left hand side of window.)
  4. Check whether ‘Windows Search‘ check box is marked. If not then mark it and click Ok.
  5. After completing this, you can follow above steps to run the Windows Search.

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” }

$feature.Delete()

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)
Or
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.
<PeoplePickerWildcards>
<clear />
<add key=”<Your Membership Provider Value Goes Here>” value=”%” />
<add key=”<Your Role Manager Value Goes Here>” value=”%” />
</PeoplePickerWildcards>
4. Save and close the web.config.
5. Now find FBA user through people picker and it will work.

Happy Share Pointing 🙂

Microsoft Visio 2010 crashes very frequently : Resolved

I was working on DFD of an on-going project. For DFD designing I chose Microsoft Visio 2010 but after doing some work on that I came to know that Visio crashes very frequently. Believe me that for callout descriptions I need to copy paste a text and for achieving this task Visio crashed more than 20 times. Totally frustrating. Well I restarted the machine and somehow managed the crashes.

On very next day I need to update that DFD and again same thing happen to me as whenever I click on save, Visio got crashed. So I decide to analyse the problem of Visio and tried to fix it. So from that very time my Visio 2010 is working fine. Below are the description of what I analysed and fixed.

When we install Microsoft Visio 2010 in to system then by default a new add-in installed and activate inside Visio i.e. Send to Bluetooth. As when you open the Visio you will find the last tab as Add-Ins and when you click on that you will find that there is Send to Bluetooth in ribbon menu. This is the root cause of Visio crashing. So I disabled this and Visio working fine for me after doing this. Find steps below:

  1. Go to File > Options
  2. Visio Options window will pop up
  3. On left hand side menu of pop up window, click on Add-Ins
  4. Now on right hand side area make sure to select COM Add-Ins options in Manage dropdown box.
  5. Click on Go button that is in front of Manage dropdown box.
  6. COM-Add-Ins window will pop up
  7. In the list of available add-ins, unselect the checkbox in front of Send to Bluetooth.
  8. Click on OK button.
  9. Restart Visio 2010 and you see that now there is no Add-Ins menu.
  10. You are now ready to work smoothly.

Cheers 🙂

Create large size file for testing on the fly!

Suppose we write some custom code for uploading/downloading files. Now we want to test the size limitation of a file for Uploading/downloading the file. So for achieving this we look a large file here and there in our system for testing.

Here i am demonstrating that how to create a large file for testing in such scenario on the fly by simply putting a command in command prompt.

  1. Open command prompt as an administrator.
  2. Write the command without quotes “fsutil file createnew C:\testfile.doc 1024000” and the simply press enter.

Now you have a 1 mb testfile in your c drive.

You can give any valid location, name, extension and size of the file to create.

Happy tricking 🙂

 

Copy & Paste between Local and Remote Desktop

1. Go to the remote desktop server.

2. Open Task Manager and click on Processes tab.

3. Look for rdpclip.exe process.

4. If find rdpclip.exe then End Process this by right click on it.
(well if you dont find rdpclip.exe in task manager then no need to worry just follow 5th step.)

5. Go to Start>Run type “rdpclip.exe” without quotes and hit enter.

6. Now your copy/paste start working.

Change Outlook Startup Folder

Outlook 2007 and earlier versions display the Outlook Today page when you first start up, but for most people it’s a fairly useless page since you just want to get to your email anyway.

You can disable Outlook Today easily, or you can use the advanced options to choose a particular folder to start in.
Click on below mentioned link.

Change Outlook Startup Folder