.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Search via SN (lastname) not working

Posted By:      Posted Date: October 27, 2010    Points: 0   Category :ASP.Net

I have created a program that will search our companies AD and bring back the results.  I have been successful in searching via samaccountname and givenName, but when I attempt a lastName search it doesn't bring anything back.

These work:

oSearcher.Filter = ("(&(objectClass=user)(givenName=" & firstName & "))")

oSearcher.Filter = ("(&(objectClass=user)(samaccountname=" & logonuser & "))")

But this one does NOT:

oSearcher.Filter = ("(&(objectClass=user)(sn=" & lastName & "))")

Any ideas?

Thanks in advance!

View Complete Post

More Related Resource Links

Sharepoint 2007 Search Not Working


I am pulling my hair out guys. I have tried everything i could find from this site and all other sites but have not been successful. No matter what i do I cannot get the search to work. We are using SharePoint 2007 and the search had been fine but our security team performed some patches and now I’m stuck with a dead search feature.

Any help would be immensely appreciated.

Things I have tried but did not resolve the problem:

1. Check all accounts and passwords

2. Run the SharePoint Products and Technologies Configuration Wizard

3. Reboot server reset IIS

4. Try to rebuild the index but that also fails

5. Check the Content Access Account

Office Sharepoint Server Search not working but Windows Server Search is.

I am having an annoying Issue with the Sharepoint 2007 Enterprise search functionality. I cannot get the Search Centre to work, the out of the box webparts crash the page except the Searchbox when the others are closed. The event viewer shows up numerous Errors (Office Sharepoint Server - EventID 7080) returns with and the same when trying to add a search related web part (e.g. core.results, federated etc). EventID 6398 - Timer is a regular as is 7080. Details below.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified).

Remote connections are connected, I am not 100% on the Instance name, (how would I go about checking this?)

Also I cannot access the link to SharedServices1 - Open Shared Services Admin site (not clickable), guess it's permissions but I seem to have full site permissions, I think I need SSP-Admin to make more edits to the Search, maybe this is related :s

Both Search Servers are runnig, I have tried everything I can think of to fix this and allow the Search Centre to work.

I am running Sharepoint 2007 on SQL Server 2008.

SharePoint Search not working on one site collection

I am running into some weird behavior with how SharePoint is crawling site/list data.  Let's say our main intranet site is http://www.intranet.com: Most of our older sites are setup with URLs like http://www.intranet.com/sites/sitename .  Crawling is working fine on these sites and I can execute a search and find all of the results I would expect.  At some point recently (before I joined this firm), they made a decision that all new sites would have the URL http://www.intranet.com/SiteDirectory/sitename .  Any sites which fall into this bucket are not being crawled, it would seem. If I check Central Adman>Shared Services>Search Administration, I can see that the first content source being crawled is http://www.intranet.com so I would imagine this crawl should pick up anything under /SiteDirectory/ but it is not.  I also checked the Crawl Settings on this page and it is set to "Crawl everything under the hostname for each start address".  Lastly, I see that there were only 21 errors in the last full crawl but none of these errors apply to a /SiteDirectory/ site. In short, what could be causing the crawl to apparently skip all of the sites within /SiteDirectory/ and how can this best be fixed?

Sharepoint Search and Secure Store Service not working

Hi There I am having issues with a few Sharepoint Services When I try to search for a document on any SharePoint site, I recieve an "Internal Server Error Exception". However when I checked the log files, I couldn't find any error messages matching with the given correlation ID. The search was working 2-3 weeks ago. Also 2 weeks ago, I started receiving warnings in the Health Analyzer saying “The Security token service is not available”. I am wondering if the security token service breaking down is related to the search issues, and if so what suggestions I could try to fix this issue. I am also unable to access the secure store service. In Central Administration->Application Management->Manage Service Applications, I try to click on the Secure Store Service, but there is no Proxy attached to the service, and I receive a message “No Secure Store Service Application Proxy ID was found”. When I check the Logfile, I receive these errors: 08/10/2010 11:11:32.94               w3wp.exe (0x18E4)                                      0x0ADC SharePoint Foundation     &nb

MS Filter pack for Zip files content search not working

I am facing a problem related to Zip files content search. Searching of content inside zip files doesn't return in search results. But searching for zip file name returns filename in search results. I look into Crawler log, all it says is:   Steps I followed to install MS Filter pack: Installed MS Filter Pack 1.0 (x64) http://support.microsoft.com/kb/946336/en-gb In Search Administration page added "zip" in File types Add Reg subkey under : "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\" for ".zip" with value ={20E823C2-62F3-4638-96BD-90F4F6784EBC} Stop and Start oSearch Run full crawl of content sources Can you please advise or have any tips you got to resolve this. Thanks http://portal/testzip.zip Crawled (The filtering process could not load the item. This is possibly caused by an unrecognized item format or item corruption. )

SharePoint 2010 Claims Based Authenticaton site working but search is broken

Hi, I have SP 2010 sucessfully installed on a Windows 2008 R2 server with SQL Server 2008 R2.  I created local machine accounts for the following: MACHINE\mssqlservice MACHINE\sp_admin MACHINE\sp_search MACHINE\sp_farms I have setup 2 sites with public facing internet access as well as local sites. I have CBA working properly on both sites from both public and private access. My problem is that when I go to search, I am constantly redirected to an error page. I have checked all SP services on the server and they are all running as MACHINE\mssqlservice That account has proper access to all sites as well as all DB's. My search is crawling and I get one error from a long named PDF file in my site, which is OK.   My questions is if my CBA is working fine and my search is crawling, why I am not getting a results page when I search from the sites:   Here is the error I get:   Error Internal server error exception:   Troubleshoot issues with Microsoft SharePoint Foundation. Correlation ID: 5a03b730-42c2-48c9-a220-3b9d052481de Date and Time: 9/9/2010 4:45:07 PM   I am kind of stuck at this point and am not sure how to proceed.  Any help would be appreciated.        --TR

Why Search Option is not working correctly in the People Search Box?


I have SharePoint Server 2010 Enterprise based intra.
I have added People search box.

Why I click the Search Options, it opens the fields top of the webpart below the search box.
So basically 2 webpart looks like they are top of each others.


Search service no longer working. :(


I stuffed up my installation of SP 2010 by first installing MS Project 2010 onto the server.  I then removed the application, this is where my problems began.  After removing my entire SP sites would not work.  I figured I had to reinstall MS Project 2010 to get the SP Admin config wizard to work correctly.  My sites then came back online. :)  But now I find my searching is not working.

I am getting the following errors

The search application 'Search Service Application' on server <SERVERNAME> did not finish loading. View the event logs on the affected server for more information

In the event log

 Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance (65a62f7e-3894-4ef8-baab-e5f699b7196a). Reason: The device is not ready. Technical Support Details: System.IO.FileNotFoundException: The device is not ready. at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Synchronize() at Microsoft.Office.Server.Administration.ApplicationServerJob.ProvisionLocalSharedServiceInstances(Boolean isAdministrationServiceJob)


Any ideas?

The search system not working



My SharePoint Search system is not working, after doing some searches I have come to the following:


Form Search Administration I have found the following

-          Propagation status    (Query server not responding)

osdx basic search provider not working


Would like to add a very basic search provider to Windows 7 so that we don't have to open the Webbrowser every time when performin a search. Serach works without any problem on the SP 2007 Website.

Have googled and found a template that I have customized to our environment:

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:ms-ose="http://schemas.microsoft.com/opensearchext/2009/">
<ShortName>WSSDemo Site</ShortName>
<Description>Search the SmartIT Sharepoint site.</Description>
<Url type="application/rss+xml" template="https://sharepoint.smartit.ch/search/_layouts/srchrss.aspx?k={searchTerms}&amp;start={startIndex}&amp;s=smartit%20Content"/>
<Url type="text/html" template="https://sharepoint.smartit.ch/SearchCenter/Seiten/Results.aspx?k={searchTerms}&amp;s=SmartIT%2

SharePoint & CRM 4.0 Integration - Cannot get finder/search working


I have a little problem with my current SharePoint and CRM integration. I used Codeplex's CRM BDC file and imported it with no issues. Using a BDC Item list I am able to pull off accounts from CRM. However, this is limted to 200 records and cannot be narrowed down.

I believe there is already an IDENumerator, Finder and Wildcard set up in the file. Has anyone managed to get this working with their own integrations? The application file has:

            <MethodInstance Type="SpecificFinder" ReturnParameterName="dbo.[FilteredAccount]" ReturnTypeDescriptorName="dbo.[FilteredAccount]DataReader" ReturnTypeDescriptorLevel="0" Name="dbo.[FilteredAccount]SpecificFinder" />
        <Method Name="dbo.[FilteredAccount]IDEnumerator">
            <Property Name="RdbCommandText" Type="System.String">Select [accountid] from dbo.[FilteredAccount]</Property>

SharePoint Search not working on my site


hi all,

i included a search control on my highly customized site that until now has not had search on it.  Simple Delegate control for the small search box.   By default it shows the drop down list with "this site" as the default.  that is fine.  I type sometihng in and get 0 results. 

all my lists are set up to be searched, my "search settings" in the site collection are set to "Do not use custom scopes".  I can't really see any other search settings. 

IS there something i need to do to get my site indexed?  i only have site collection admin on this particular collection, the actual SP environment is huge and all other areas search pretty well, unfortunately i am no admin on any of those areas and have limited access.

any help appreciated.




SharePoint Search not working on all front ends


SharePoint Server 2010  wfe1 - hosts the CA and the Search Service Service Application.  It is hosting the only crawler, and the admin component.  the DBS are on the SQL Server. The SharePoint Search Service 14 is running on this server.

SharePoint Server 2010 wfe2 - nothing on this but duplicates to the site collections on wfe1 which are being served from theis wfe with no issues to clients
The SharePoint Search Service 14 is NOT running on this server, it is present, it's disabled and will not start from within 'Services on Server' in the CA.

On a client machine loading a site from wfe1 i can search content with no issues.
on the same client accessing the same site but only being served from wfe2 - receive the following error:

"The Web application at http://f2wfe10-2/ could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application."

running get-SPEnterpriseSearchServiceInstances returns only the wfe1 server with a status of online.
if i try to add the wfe2 server start-SPEnterpriseSearchServiceInstances it just stays in 'provisioning' status.  so i removed it by issuing the 'stop-SPEnterpriseSearchServiceInstance

Search working for only select users in same domain


I have encountered an issue where one user is able to conduct a search and retrive a full list of results but another user in the same domain and same membership group recieves no results at all.  Our environment is complex with several domains each trusting one another.  The SharePoint build is as follows:


2 Front End Servers with Loadbalance, 1 Application Server, 1 Index Server


So far I have tested with a user that cannot get results from a terminal client, desktop cleint and VPN remote access in all cases the user is unable to return results.   This user has accounts in 2 domains and when selecting to log on as a different user in the other domain results are returned.  I beleived then that it had to be an account issue in the other domain.  However when I worked with another user who also has accounts in both domains that user was not able to return results with either account.  So I am not sure it is domain account related.


I setup a dev box in the domain and made it bare bones with no load balancer, however when I add the user account who was having issue and a search is run no results are returned. 


The search database appears fine and healty and data is populating the tables

Full text search not working for pre-existing data on table after installing docx filter.However wor


Hello All,


I have a strange issue. I have pre-existing data in my table with full text index defined along with catalog. I noticed that I did not have the docx filter ,so I installed the filter and performed the steps below. After installing the filter  I added a couple of new records. I noticed that the full text search pulled up the new records matching the criteria but did not return any pre-existing records. Could you please let me know the issue.Please note – currently I am using sql 2008 , but also would like to verify the same in sql 2005 as well.

Also could you please verify the steps below for installation in sql 2008 and sql 2005 and with different architectures (Eg windows 2003/2008, 32bit, 64 bit etc)


This was tested on VM image on 64 bit architecture Windows 200

User Profile -- search for Department not working


I am trying to search for users who are in certain department. E.g HR. But the following returns nothing.

In user profile, I have a field department (property name), I wonder why it returns nothing.


And even when I tried http://mycompany.intra/SearchDEf/Pages/peopleresults.aspx?k=Department, it returns only 47 records. And when I actually look at some of the records, some of them have value in department but some of them are empty. So, I am wondering if it is looking at something else instead of the department field.

Please advice. Thanks in advance.

Search Synonyms not working as expected



In the Search Keywords section, I have setup a keyword with synonyms, but when I search the synonym words, the same results don't display.  For instance, my keyword is "test", synonyms are "tst" and "tset".  When I search for the synonyms, the test results do not display - am I missing something in the setup or search side?  Isn't that how it's supposed to work?


Thanks in advance!

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend