Friday, January 20, 2012




I am trying to ResolvePrincipal using People.asmx in two seprate farms. Both farms are single server farms with same configuration . Both farms target the same AD for user information. End point of AD being use din both the farms are the same .

But one one server it takes average 3.5 seconds to Run this web service method, but on the other it takes 43 seconds.


What could be the reason behind ?

Reply 1:

Check out a network trace using the tool Netmon.

Varun Malhotra

Wednesday, December 7, 2011

SharePoint 2010 | User Profiles | Recent Activities


While querying user profile changes we can get changes upto last 14 days.

Now,I want to know about recenet activities web part which shows user profile edits by the user. Up to which point in the past , it shows the user profile changes as recent activities ?

I need to know the duration (in days) in past for which the changes in user profile are reflected as recent activities on page : http://<server>/my/Person.aspx?accountname=domain\AccountID

Reply 1

Helo Heamntrhtk,


Check on this site you can configure it:

Under section:"Timer Jobs Required"


The following are listed in the webpart:

Rating, blog, tag, like, ..

Activity Feeds are an ongoing record of a user’s activities through the day (or for whatever time period in which they choose to update the feed). There are two sections of Activity feed.

· My Activities - My Profile > Recent Activities

· Consolidated - My Newsfeed (Activities which track)

These two sections are like two sides of a conversation. Both are depending on Activity Feed timer job.

Kr, Gokan


Reply 2

Only the following activities will be displayed in the recent activities.

Rating, Tagging, new blog post and so on.


Wayne Fan

How to exclude items from Search Result page?

in sharepoint 2010, there is an option to remove a url from search results immidiately, corresponding crawling rules/ exclude rules are set automatically

And the that specific content does not get crawled.


Otherwise go for Crawl exclude rules directly.

Tuesday, August 9, 2011

The user does not exist or is not unique FBA while adding AdGroup to siteGroup SharePoint 2010


I tried to add an ADGroup/FBARole to  site  group . In 2 ways:

1 is AddUser(SPUser user);

2nd is AddUser(string loginName, string email, string name, string notes)

code for 1st option:

SPUser cntrSubSiteUser = CreateUser(Constants.C_FBA_AUTHENTICATION_GROUP_PREFIX + RoleProvider + Constants.C_AUTHENTICATION_PIPE + ADgroup, "", ADgroup, "", web.Site);//loginname in format in format c:0-.f|roleproviderName|pp 1001 siteGroup.AddUser(cntrSubSiteUser);


and the createuser function is like;

private static SPUser CreateUser(string strLoginName, string strEMail, string strName, string strNotes, SPSite spSite) { SPUser spReturn = null; SPRoleAssignment spRoleAssignment = new SPRoleAssignment(strLoginName, strEMail, strName, strNotes); SPRoleDefinition spSPRoleDefinition = spSite.RootWeb.RoleDefinitions["Read"]; spRoleAssignment.RoleDefinitionBindings.Add(spSPRoleDefinition); spSite.RootWeb.RoleAssignments.Add(spRoleAssignment); //Update site spSite.RootWeb.Update(); spReturn = spSite.RootWeb.AllUsers[strLoginName]; return spReturn; }


for the second option code is like:- siteGroup.AddUser(Constants.C_FBA_AUTHENTICATION_GROUP_PREFIX + RoleProvider + Constants.C_AUTHENTICATION_PIPE + ADgroup, "", ADgroup, "");//Login Name in format c:0-.f|amsurgrole|pp 1001





Now lets come to the problem:

On 1 of our dev servers it works fine. But on production we get the error: The user does not exist or is not unique

However by UI, We can add this FBA Role  to any group.


please help.


Reply 1



we have got the solution.


we are adding user in group for site 1( on web app 1) from site 2 ( on web app 2) code.  web app 1 is FBA .  site 2 is normal windows site.

in 2007 this code works fine


but for sharepoint 2010, we need to give entries for roleprovider and membership provider in web application 2 (admin web app) web.config  also.

                                                                      Reply 1.1

 I  am also getting the same exception. I am doing everything on a single sharepoint application

[SPException: The user does not exist or is not unique.]


Can you please point out, what are the other scenarios for the exception to happen?

Reply 1.1.1

did u also do ensure user ? also make sure user exists in ad/ ur membership provider


when extending the application it named the membership provider wrongly, hence the error is caused. Thanks for all the replies. Now the problem is solved.

Tuesday, June 21, 2011

Few of the SharePoint Sites not accessible outside server



Few of my sharepoint sirtes do not open outside the server. Others are working fine. Did you faced such issue in past ?

I verified almost every setting . All the settings on both type of web applications are same.

Reply : 

It was due to firewall settings on the server.

Tuesday, June 14, 2011

SharePoint disable loopback check | Specify Host Names

A number of errors related to authentication failure are reported with SharePoint 20xx

You can try disable loopback check  or Specify host names based on how much you can compromise on security front.

Method 1: Specify host names (Preferred method if NTLM authentication is desired)

To specify the host names that are mapped to the loopback address and can connect to Web sites on your computer, follow these steps:

  1. Set the

registry entry to 1.

2. Click Start, click Run, type regedit, and then click OK.

3. In Registry Editor, locate and then click the following registry key:
4. Right-click MSV1_0, point to New, and then click Multi-String Value.
5. Type BackConnectionHostNames, and then press ENTER.
6. Right-click BackConnectionHostNames, and then click Modify.
7. In the Value data box, type the host name or the host names for the sites that are on the local computer, and then click OK.
8. Quit Registry Editor, and then restart the IISAdmin service.

Method 2: Disable the loopback check (less-recommended method)

The second method is to disable the loopback check by setting the DisableLoopbackCheck registry key.

To set the DisableLoopbackCheck registry key, follow these steps:
1. Set the
registry entry to 1.
2. Click Start, click Run, type regedit, and then click OK.
3. In Registry Editor, locate and then click the following registry key:
4. Right-click Lsa, point to New, and then click DWORD Value.
5. Type DisableLoopbackCheck, and then press ENTER.
6. Right-click DisableLoopbackCheck, and then click Modify.
7. In the Value data box, type 1, and then click OK.
8. Quit Registry Editor, and then restart your computer.

$regKeyPath = "HKLM:\System\CurrentControlSet\Control\Lsa"
$key = "DisableLoopbackCheck"
New-ItemProperty -Path $regKeyPath -Name $key -Value "1" -PropertyType dword

Reference :

Friday, June 10, 2011

refer unsigned assembly in SharePoint 2010 Project ( Visual Studio 2010)

I have around 50 3rd party dll's which I need to refer in my SharePoint project.
But since my project dll is strong named we were unable to refer unsigned dll's in it.
I tried below mentioned things:
1. removed signing of my dll from project properties. Project is build But in this case xml template of the package fails .The error I get while package creation is :
Value cannot be null. Parameter name: PublicKey
2. I tried below mentioned commands to strong name all the 3rd party dlls :
ildasm myDLL.dll /
This generates and myDLL.res
ilasm /key:Key.snk /res:myDLL.res /dll /out:myDLL.dll
This generates back strong named DLL.
But after this few of the namespaces get missing in the final DLL !!!!! well to my surprise .
3. I created a blank class library project . Given predefined structure to deploy 3rd party dll ( 80\bin) , with user controls inside proper structure as per wspbuilder guidelines. given the output path of my project dll as (80\bin).
Now I have a wsp ready and working being deployed . But neither my project dll is strong named nor the third party DLLs. dlls are deployed in web application bin and user controls inside proper control template folders . They work fine . but …
Now I come to my query:
I need to strong name my project dll still use 3rd party unsigned dll's inside my SharePoint project very similar to point 2 above.
Kindly suggest something.

Reply 1 By

Ask the 3rd party to provide properly signed assemblies?


Reply 2 By


Might be a good option to wrap your business logic up that uses the DLLs in a WCF service and run it outside SharePoint, then you can call these methods safely from inside SharePoint (are you writing web parts?).

Reply 3 By

1. Use IlDasm to disassemble the DLL to an .il File

2.  Then use IlAsm to reassemble it passing in a new key generated with the sn command line utility to generate strong names.

Make sure you use the .Net 3.5 versions of ILDasm and ILAsm or it will reassermble the Dll for the wrong framework, sharepoint  2010 stuff is .Net 3.5

The downside is you'll have to do that everytime a new version comes around.

This is how I got the .Net 3.5 version of the AJAX Control Toolkit to work in sharepoint 2010.


Heres a pretty in depth article that even covers signing DLL's that reference each other.

My Blog: Website: Under Construction