Tuesday, January 29, 2008

MOSS Indexing

Joel Olson has a great blog post on the anatomy of MOSS indexing. Here is an excerpt from his post. When a full crawl is started, then :
  • Indexer communicates with a WFE web service, the sitedata.asmx
  • Enumerates the URLs and gathers metadata
  • With the URLs it issues GETS for the content from the content database to retrieve the page content and subsequent documents and lists
When an incremental crawl is started, then:
  • Indexer communicates with a WFE web service sitedata.asmx to read the change log through WSS Object model
  • Does enumeration and returns changed/added/deleted URLs and metadata to the indexer
  • Indexer issues http GETs to index the relevant content
I can also add a few tips:
  • An incremental crawl will go ahead and delete any content it cannot find (even if it was previously found). Be careful about crawl rules being added and deleted. Also check to see if all your pages are working properly or else they will be deleted
  • Incremental crawl will index aspx files and all other document types during incremental crawl. It will NOT detect changes to aspx files
  • Incremental crawl is very fast compared to a full crawl.
  • You can easily run into memory exceptions (specially 'Error in Site Data Web Service: Out of Memory Exception'). This might be because of the number of documents in the library. The only way out can be to reduce the number of documents/migrate to 64 bit (I cannot confirm this statement...Iam still having a simillar problem). You should also try to add Impact rules and change the interval between each request.

Monday, January 28, 2008

Export MOSS Search Settings

For a long time now, I have been looking for a tool to export all my search settings from production to development environment and I thought the only way to do this is through the MOSS backup/restore process. But, there is a tool to do all this for you. You can basically export all your Content Sources, Managed Properties and Scopes using this tool. Check out the tool here:

http://www.codeplex.com/SSSPPC

Thursday, January 24, 2008

After 6 months with my IPhone

How does one feel after spending 6 months with his IPhone ? Does he feel really excited to own such an exquisite gadget or does he feel bad for spending approx 500 bucks for a phone which got reduced to 300 after a couple of weeks ? To find out more read on....
- points
  • Bad Speakers ...sometimes it really gets on my nerve. When talking on the fone while driving or listening to music you need really good speakers and this is something IPhone doesn't have.
  • Battery life...I need to charge it every night or my fone is dead the next morning.
  • Browser crash...Quite often the browser crashes or responds too slowly.
  • No video camera.
  • Cannot create custom apps without hacking it.....Creating our own apps would have been a great feature if available.
+ points
  • Now having mentioned the - points, the + points would be a long one starting with an excellent design making you will love it instantly. You cannot stop showing it your friends, co-workers and to others...
  • Google Maps.
  • Watching youtube videos without switching on your laptop.
  • Browsing internet and accessing your email from anywhere and anytime .
  • Google has been really good in developing applications customized to iphone and these really help using it.
  • Tracking your voicemail and sms from a particular caller....This is quite different from other phones.
I have not mentioned anything about the ipod features in an IPhone because this in not something I use everyday. I use my iphone as a music player probably a couple of times a week but mostly it ends up being my fone.
It has been very good to me even though I dropped and abused it a couple of times. I cannot imagine waking up one day and not finding my IPhone next to me. It greets me with an alarm every morning, gets me the latest news, shows my calender, gets my email and all this happens without you getting out from your bed. Don't you think this is enough to own an IPhone ?

Later,
Prashanth

Wednesday, January 23, 2008

AIM 6.5 on Vista with UAC turned off

Today, one of the users complained about wireless not working, the Network Sharing center taking ever to load and Remote Desktop not working. I checked the services and most of them were not started. I tried to start the Network List service but it was throwing an error:

"Insufficient system resources exist to complete the requested service"

I tried googling and the following came up:

http://forums.microsoft.com/technet/showpost.aspx?postid=2326150&siteid=17&sb=0&d=1&at=7&ft=11&tf=0&pageid=0

The posts were explaining exactly what I was facing. AIM 6.5 was causing a problem, but the user had installed AIM long time back and the problem started occuring recently. I uninstalled AIM, but it had no effect. The following steps solved the issue:
  • After uninstalling AIM, I turned on UAC
  • Restarted the system
  • Installed AIM and it started to work
You have to install AIM again to get the wireless and the rest of the stuff to work. Just uninstalling AIM and turning on UAC will NOT fix the problem.

Tuesday, January 22, 2008

MacBook Air

Check out the Macbook Air Ad here:



Also, check out the parody to the above one:

TechEd 2008

Registration for TechEd 2008 has opened and if you register before April 2008, you can save 200$. They have two tracks :
You will get to know more about the unreleased, state of the art technologies and also spend some really good time in Orlando, Florida.

Saturday, January 19, 2008

Hosts file getting deleted

Today, I modified the search indexer to point to a seperate wfe server instead of crawling all the wfe's. Once I modifed the setting, the following error started throwing up in the eventviewer:

Reason: Could not find file 'C:\WINDOWS\system32\drivers\etc\HOSTS'.

Event Type: Error
Event Source: Office SharePoint Server
Event Category: Office Server Shared Services Event ID: 6482
Date: 1/19/2008
Time: 6:12:03 AM
User: N/A
Computer: ******************
Description:Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance Reason: Access to the path 'C:\WINDOWS\system32\drivers\etc\HOSTS' is denied.
Techinal Support Details:

System.UnauthorizedAccessException: Access to the path 'C:\WINDOWS\system32\drivers\etc\HOSTS' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.StreamWriter.CreateFile(String path, Boolean append) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) at System.IO.StreamWriter..ctor(String path, Boolean append) at System.IO.FileInfo.CreateText() at Microsoft.Search.Administration.Security.HOSTSFile.CleanupDedicatedGathering(Hashtable HOSTSFileMappings, StringBuilder HOSTSComments, IEnumerable obsoleteHosts, String dedicatedName, Boolean isDirty) at Microsoft.Search.Administration.Security.HOSTSFile.ConfigureDedicatedGathering(SearchServiceInstance searchServiceInstance, SPServer dedicatedWebFrontEndServer, IList`1 previousWebApplicationHostNames) at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.SynchronizeDefaultContentSource(IDictionary applications) at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Synchronize() at Microsoft.Office.Server.Administration.ApplicationServerJob.ProvisionLocalSharedServiceInstances(Boolean isAdministrationServiceJob)

The above error shows up because the Sharepoint Timer job actually deletes the hosts file after you modify the wfe the crawler has to point to. I had taken a backup of file and I went ahead and restored it. But after restoring it back, the following error throws up in the eventviewer:

Reason: Access to the path 'C:\WINDOWS\system32\drivers\etc\HOSTS' is denied.

Event Type: Error
Event Source: Office SharePoint Server
Event Category: Office Server Shared Services
Event ID: 6482
Date: 1/19/2008
Time: 6:22:50 AM
User: N/A
Computer: ******************
Description:Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance
Reason: Access to the path 'C:\WINDOWS\system32\drivers\etc\HOSTS' is denied.
Techinal Support Details:System.UnauthorizedAccessException: Access to the path 'C:\WINDOWS\system32\drivers\etc\HOSTS' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileInfo.Delete() at Microsoft.Search.Administration.Security.HOSTSFile.CleanupDedicatedGathering(Hashtable HOSTSFileMappings, StringBuilder HOSTSComments, IEnumerable obsoleteHosts, String dedicatedName, Boolean isDirty) at Microsoft.Search.Administration.Security.HOSTSFile.ConfigureDedicatedGathering(SearchServiceInstance searchServiceInstance, SPServer dedicatedWebFrontEndServer, IList`1 previousWebApplicationHostNames) at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.SynchronizeDefaultContentSource(IDictionary applications) at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Synchronize() at Microsoft.Office.Server.Administration.ApplicationServerJob.ProvisionLocalSharedServiceInstances(Boolean isAdministrationServiceJob)


The following permissions need to be given to c:\Windows\System32\Drivers\etc folder for the wss_admin_wpg account :

  • Traverse Folder / Execute File
  • List Folder / Read Data
  • Read Attributes
  • Read Extended Attributes
  • Create Files / Write Data
  • Read Permissions
  • Delete Permissions ( I will explain this .....)

The delete permission also needs to be given because the timer job actually deletes and recreates the hosts file. I was a bit hesitant to give this but had to do so to get it to work. After the permissions are given, I did not see any other errors in the eventlog

Later..

Wednesday, January 16, 2008

Query.TotalRowsExactMinimum Property

Do you want to know what 'Query.TotalRowsExactMinimum' Property does ? Check it out here.....

http://msdn2.microsoft.com/en-us/library/microsoft.office.server.search.query.query.totalrowsexactminimum.aspx
There is no way one can understand what exactly it means ? Please let me know if someone knows what exactly it means.

Saturday, January 12, 2008

Phili code camp 2008.1

I just got back from Code camp and it was great. I started to blog using my IPhone and somewhere in middle, I lost interest to blog and therefore after the third session, you will not find anything except the session titles. I will update them later sometime. Also, please bear with me for the formatting of the text as it was done from an IPhone and right now I am really tired to make any changes....

Session 1:
Test driven development for T-SQL code
Write your test first and then the code.
Write the function that returns data.
Check that the function returns expected data.
How to deal with constraints?
Instead of directly dealing with the table with constraints, create a view that deals with a dummy table without any constraints. Create a procedure to change the table name. But obviously the production view cannot point to a dummy view.This is one of the disadvantages of using a dummy table. Also this would work only for unit testing and not integration testing.ETL would not work in this case either.Always execute your tests after code changes.
Naming: ut_testcasename
use suite of tests

Session 2:
Visual studio 2005 tools and add ins
vs express does not support add ins
command monitor
csproj files are really msbuild files
msbuild sidekick, a third party tool helps with msbuild
Enterprise library helps with basic application blocks
VSTO - visual ribbon and other add INS from vstudio
Resharper - grays out things not being used, helps with error detection and intellisense.It needs to be licensed.
T4 tool helps with color coding the template, use the *tt *t4 extensions.
Zenocode postbuild: .net obfuscator
Reflector: decompiler
Project line counter: specific projects,exlude designer autogenerated code.
Smart paster: paste as string or paste as comments or paste as region
Visual local history: slick tool for version historyFilecompare: Beyond compare
Enlarging tool tips: Tools --> Options --> Font & Colors -->Editor tool tip

Session 3:Sharepoint backup and restore
Session 4:
Exception handling
Session 5:
AJAX and Silverlight

Session 6:
AJAX and Sharepoint

Wednesday, January 9, 2008

Login failed for user 'YourUserName'. The user is not associated with a trusted SQL Server connection.

I was trying to add a new user to one of the databases and it was throwing me this error:

Login failed for user 'YourUserName'. The user is not associated with a trusted SQL Server connection.

I had seen this error before, but was not able to quickly realise the reason for the failure. I had created a sql server login, then a database user and finally mapped the sql server login to the database. The roles for the user were also set properly.

It was the sql server authentication modes. SQL Server was configured for only Windows authentication and not SQL authentication. Once SQL Server authentication was enabled, it worked fine. I had to reset the password after enabling SQL Server authentication mode.

Sunday, January 6, 2008

Taare Zameen Par (Indian Hindi movie)

This is one of the best Indian movies ever made. No wonder Aamir Khan is called "The Perfectionist".
Its a story of a young dyslexic kid (Ishaan), portrayed beautifully by Darsheel Safary. The story unfolds with Ishaan being hunted by the dancing letters (as called by Ishaan for his difficulties with decoding words). He lives in his own world inspite of the rigorous wordly competition and hence lags behind in studies and gets taunted both at home and school. Despite his pleas, his parents move him to a boarding school and eventually he looses interest in his best expertise, Painting. The way the director handled the emotions of Ishaan is worthy a praise and you will be able to recognize the character. You will laugh with him, sail through his canvas and also cry with him (not once but many times). Nikumbh (played by Aamir himself) is the new art teacher at the boarding school and it doesn't take him too much time to recognize Ishaan's problems. Being a dyslexic himself, he tries to explain to Ishaan's parents about their son's problem and also his great painting talent. He also goes the extra mile of helping Ishaan to overcome his problems in a very creative way. I will stop here without going further, as you should watch it to know the ending.

As I walked out of the theater, I could see fathers hugging their sons with affection. Most of them were wiping their tears while walking towards their cars.....

Links:
http://www.taarezameenpar.com/

Tuesday, January 1, 2008

Resetting search index error

I was trying to reset the search index on my dev box and the following error message comes up while doing so:

The application is unable to accept further updates because the last attempt to persist the state failed.

Checking the event logs show up following messages:

Unable to Reset search application 'Shared Services'. Microsoft.Office.Server.Search.Administration.DatabaseException: Unable to persist changes to the search application object due to a previous error persisting changes. See event log for more information on the cause. Only read operations are possible until the issue is resolved. ---> System.Runtime.InteropServices.COMException (0x80040DBA): The application is unable to accept further updates because the last attempt to persist the state failed. See the event log for more details. at Microsoft.Office.Server.Search.Administration.MSSITLB.IGatherApplication2.ValidateVersionForWrite(Int32 lLastVersion, Int32& plVersionOut) at Microsoft.Office.Server.Search.Administration.SearchApi.WriteAndReturnVersion(CodeToRun`1... .. remoteCode, VoidCodeToRun localCode, Int32 versionIn) --- End of inner exception stack trace --- at Microsoft.Office.Server.Search.Administration.SearchApi.WriteAndReturnVersion(CodeToRun`1 remoteCode, VoidCodeToRun localCode, Int32 versionIn) at Microsoft.Office.Server.Search.Administration.SearchApi.ResetApp(Int32 versionIn) at Microsoft.Office.Server.Search.Administration.SearchApi.ResetApp()

To fix it, I tried the following steps:
  • Operations -> Services on server -> Office Sharepoint Server Search - > stop
  • Started the service again
  • SSP site -> search settings
  • Here you need to associate the SSP with the search database
  • Once its done, go back to the search settings page and wait for sometime for the indexer to complete its job (probably 2-3 minutes)
  • Now the search index can be reset.

Happy new year

Wish you all a very happy and prosperous new year !