Tuesday, August 31, 2010

404 errors and the XamWebSpellChecker dictionary file

I added Infragistics' XamWebSpellChecker control to one of my Silverlight 4 data entry user controls and it worked like a charm.

Well, it worked on my machine.

Once I got the application on a server spell checking stopped working: a progress dialog would briefly appear and nothing else. Fiddler revealed that when my app was trying to check spelling and requesting the download of a dictionary it was only receiving a 404 response. First I checked the server to make sure that the file had been properly deployed to the IIS6 host. Check. I then reviewed the instructions regarding the usage of the dictionary file and it appeared that I had used the correct file. I started thinking about the binary dictionary file, which had a ".dict" extension. How would IIS know what to do with a .dict file? I logged on to the server and added a new entry: Files with a .dict extension are of "application/octet-stream" MIME type. I issued an iisreset command.

Then with great trepidation I tried to check spelling again...

BAM! Adding the MIME entry was the solution. The spell checker control was functional again. I could rest easy, knowing that no misspelled words would be allowed ever again!

At least not on a single data entry form in a departmental content management system. You've got to start somewhere.

1 comment:

  1. I've been .dict (sic) by Infragistics many times.

    ReplyDelete