Thursday, January 10, 2008

Search Does not work with Basic Authentication, only WSS 3.0

WSS 3.0 Only with Basic Authentication to Search the Sites

Only WSS 3.0 is installed and Basic Authentication is configured so that while logging to the site domain\username and password is not required, only username and password should work.


But by design Search in WSS 3.0 with Basic Authentication will not work. So there is a work around for the same which can be followed by using the following article.


http://technet2.microsoft.com/windowsserver/WSS/en/library/8208d71e-7c41-4845-bc06-95429de02cf11033.mspx?mfr=true

But this above article is misleading many times as every network has various scenarios.

Step by Step to configure this setup

1. Open Central Administration Site ->Application Management -> Create or Extend Web Application -> Extend an Existing Web Application.

a. Select the main Web application
b. In IIS Web Site select ‘Create a new IIS Website’
c. Give port no. 81 or any random port you want.
d. Enter a hostheader if desired.
e. Select NTLM as Authentication Provider.
f. In Load Balanced URL select ‘Intranet’ Zone. Click on OK.

2. In Central Administration -> Application Management -> Authentication Providers.

a. You will see the Default Zone and the Intranet Zone where we extended the new site.
b. Click on Default zone; make sure that only Basic Authentiation is selected. Click on OK.
c. Click on Intranet zone; make sure that Windows Integrated is selected. Click on OK.

3. Open IIS console -> Web Sites.

a. Go to the properties of the Main site -> Directory Security
b. Click Edit in Authentication and access control.
c. You should see only ‘Basic Authentication’ selected over there.
d. In Default Domain type \ (backslash)
e. Click on OK. Click on OK.

4. Open Central Administration -> Operations -> Alternate Access Mappings -> Select the Main Web Application.

a. You will see 2 zones having URL’s specified. In default zone your primary URL. In Intranet zone the URL and port no. which you extended the main site with.
b. We have to now swap these 2 zone URL’s Put the Default URL in the Intranet zone and the Intranet zone URL in the Default zone.

5. Perform an IISRESET.

6. Check the Eventviewer App Log and verify that we should NOT get the event id 2436 gatherer which is a warning. This warning will come after every 5 mins if Search will not work, otherwise it will not come.

We have to swap the URL’s in AAM purely because Search always renders the page which is mentioned in the Default Zone and then crawls it. After the Swap of the URL’s in AAM, as the default zone URL will be of Windows Integrated, Search will be able to render it, crawl and we will be able to see the search results after 5 mins. In App log you will stop seeing event id 2436 warning and event ID 10044 information event which means that search should work fine.

8 comments:

tuccitown said...

I have completed the above steps and I can see that I am now getting successful crawls on the SharePoint sites, however when a seach attempt is made I get "The search request was unable to connect to the Search Service."

Any idea what may be causing that?

Thanks,

Jack

Parmi said...

Hi Jack,

Can you check your Site Search Settings? Site Actions -> Site Settings -> Search Settings.

that site is not able to connect to the search service some how. if you check other site collections what is the result?

sorry for the delay in reply

Anonymous said...

The Search works fine in the main site.But when I try to search in the subsite level ,It says No results found.

Any suggestions?

Thanks
Sam

Parmi said...

Hi Sam,

Can you check the subsite settings? Site Actions -> Site Settings -> Search Visibility.

Make sure it is 'Yes' for "Allow this web to appear in search results? "

else you can say 'No' click OK and again select 'Yes', click OK. it works sometimes.

Regards,
Parmi

Anonymous said...

Search visibility is 'Yes' in the subsite setting.
Actually If I search for a keyword which is within the subsite and select the option 'All Sites' my search returns with the results.
But if I select 'This Site' then my search says 'No Results Found'

Thanks
Sam

Parmi said...

That means your search is working fine but the Site Scope is not. check the Search Settings. you can Also try to Reset all crawled content from SSP Search settings and check. for Troubleshooting enable verbose logging on search and see if it gives specific errors related to that subsite.

Anonymous said...

why should the default URL be mentioned in the start Addresses of Crawl settings?If I specify the Intranet URL instead of Default URL here, the search for 'This Site' does not seem to work.My confusion here is both Intranet URL and Default URL[This is done in AAM] is pointing to the same site.But still why should I specify the default URL in Start Addresses for crawling?Please suggest

Parmi said...

I am not sure Why, there seems to be a glitch in SP 2007 search that only the Default URL is taken to render the sharepoint pages and index them.

You can still keep the custom URL in the Intranet zone and let the default URL be as it was early. Your custom URL at intranet zone will work fine

Total Pageviews