Home Search Member List Faq Register Login  
UltimateSpell
Re: Spell As You Type using two different dictionaries on the same page?

Thread Starter: mlin   Started: 04-23-2007 12:18 PM   Replies: 12
 Karamasoft Support Forums » General Discussions » UltimateSpell » Re: Spell As You Type using two different dictionaries on the same page?
 Printable Version    « Previous Thread   Next Thread »
  23 Apr 2007, 12:18 PM
mlin is not online. Last active: 6/29/2007 1:45:34 PM mlin

Top 10 Posts
Joined on 04-23-2007
Posts 7
Spell As You Type using two different dictionaries on the same page?

Hi,

I've been getting an intermittent error while attempting to apply "Spell As You Type" to two different textboxes on the same page, each using a different dictionary (en-CA for one and fr-FR for the other).  I've listed the details of the exception below (when the error occurs, this text is displayed in one of the textboxes, but the rest of the page behaves normally).  Any idea what the problem may be?

Thanks,
Michelle

-----

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.


Exception Details: System.Web.HttpException: Failed to map the path '/web/infotel/UltimateSpellInclude/Dictionary/en-CA/en-CA.dic'.

Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace:
[HttpException (0x80004005): Failed to map the path '/web/infotel/UltimateSpellInclude/Dictionary/en-CA/en-CA.dic'.]   System.Web.Hosting.ISAPIWorkerRequestInProcForIIS6.MapPathSlowUsingIISCore(String path) +197
System.Web.Hosting.ISAPIWorkerRequest.MapPath(String path) +420   System.Web.HttpRequest.MapPath(String virtualPath, String baseVirtualDir, Boolean allowCrossAppMapping) +254
System.Web.HttpServerUtility.MapPath(String path) +60     
Karamasoft.WebControls.UltimateSpell.Callback.a(Object A_0, EventArgs A_1) +405 
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
-------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2379; ASP.NET Version:1.1.4322.2379 "
Server Error in '/web/infotel' Application.
-------------------------------------------------------------------------------
Failed to map the path '/web/infotel/UltimateSpellInclude/Dictionary/en-CA/en-CA.dic'.


  
  23 Apr 2007, 12:54 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: Spell As You Type using two different dictionaries on the same page?
By lookign at the error message, it seems that the dictionary file '/web/infotel/UltimateSpellInclude/Dictionary/en-CA/en-CA.dic' cannot be reached. Can you make sure the directory exists and can be reached from your web application? If you haven't already installed the en-CA dictionary, you can download it from our website at http://www.karamasoft.com/UltimateSpell/Dictionary.aspx
If this doesn't help, reply with your page code so that we can try to reproduce the issue in our test system.

  
  23 Apr 2007, 1:51 PM
mlin is not online. Last active: 6/29/2007 1:45:34 PM mlin

Top 10 Posts
Joined on 04-23-2007
Posts 7
Re: Spell As You Type using two different dictionaries on the same page?

Yes, the directories exist, and should be reachable.  I've only seen this error when I try to use more than one dictionary on the same page.  The failure is intermittent (which makes me suspect that there's a race condition), and it usually occurs the first time the page is loaded, and not in subsequent loads within the same session.  Sometimes only the en-CA.dic fails to be reached, sometimes only the fr-FR.dic fails to be reached, and sometimes nothing fails (but never both dictionaries at the same time).

Here are the relevant sections of code:

<%@ Register TagPrefix="cc1" Namespace="Karamasoft.WebControls.UltimateSpell" Assembly="UltimateSpell" %>

...

  <TR>
    <TD class=contentbold vAlign=top align="right" width=135><%=_scripts["wbtxt_jobdetails_englishttsposter"]%>:<span class=contentred>*</span></TD>
    <TD class=content vAlign=top align=left><asp:TextBox id="textbox_englishttsposter" Width=520 runat="server" TextMode=MultiLine Rows=8 Wrap=True CssClass="inputs"></asp:TextBox><br>
    <cc1:ultimatespell id="UltimateSpell1" runat="server" SpellAsYouType="True" Dictionary="en-CA" ShowOptions="True"
  ControlIdsToCheck="textbox_englishttsposter">
  <MisspelledWordStyle Font-Bold="True" ForeColor="Red"></MisspelledWordStyle>
  <SpellButton id="SpellButton1" ImageAlign="AbsMiddle" ImageUrl="" ButtonType="Button" Text="Spellcheck" CausesValidation="True"></SpellButton>
 </cc1:ultimatespell>
    <asp:Button id=button_playttsenglish Runat="server" CssClass="inputs" Text=""></asp:Button></TD>
  </TR>
  <TR>
    <TD class=contentbold vAlign=top align="right" width=135><%=_scripts["wbtxt_jobdetails_frenchttsposter"]%>:<span class=contentred>*</span></TD>
    <TD class=content vAlign=top align=left><asp:TextBox id="textbox_frenchttsposter" Width=520 runat="server" TextMode=MultiLine Rows=8 Wrap=True CssClass="inputs"></asp:TextBox><br>
    <cc1:ultimatespell id="UltimateSpell2" runat="server" SpellAsYouType="True" Dictionary="fr-FR" ShowOptions="True"
  ControlIdsToCheck="textbox_frenchttsposter">
  <MisspelledWordStyle Font-Bold="True" ForeColor="Red"></MisspelledWordStyle>
  <SpellButton id="SpellButton2" ImageAlign="AbsMiddle" ImageUrl="" ButtonType="Button" Text="Spellcheck" CausesValidation="True"></SpellButton>
 </cc1:ultimatespell>
   <asp:Button id=button_playttsfrench Runat="server" CssClass="inputs" Text=""></asp:Button></TD>
  </TR>

...


  
  23 Apr 2007, 3:55 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: Spell As You Type using two different dictionaries on the same page?
Are you by any chance of recycling application pools on IIS frequently, which might be removing dictionaries from cache. We tested your code, and couldn't reproduce the problem.
  
  23 Apr 2007, 4:35 PM
mlin is not online. Last active: 6/29/2007 1:45:34 PM mlin

Top 10 Posts
Joined on 04-23-2007
Posts 7
Re: Spell As You Type using two different dictionaries on the same page?
No, I'm not recycling application pools on IIS frequently.
  
  24 Apr 2007, 5:09 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: Spell As You Type using two different dictionaries on the same page?
Can you try it on a different machine. We tried your code on two different machine, and both worked properly.
  
  25 Apr 2007, 11:18 AM
mlin is not online. Last active: 6/29/2007 1:45:34 PM mlin

Top 10 Posts
Joined on 04-23-2007
Posts 7
Re: Spell As You Type using two different dictionaries on the same page?

It fails on more than one machine for me.


  
  25 Apr 2007, 11:53 AM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: Spell As You Type using two different dictionaries on the same page?
Does it work fine when SpellAsYouType is set to false?
  
  25 Apr 2007, 12:47 PM
mlin is not online. Last active: 6/29/2007 1:45:34 PM mlin

Top 10 Posts
Joined on 04-23-2007
Posts 7
Re: Spell As You Type using two different dictionaries on the same page?
Well, I don't get that exception with SpellAsYouType set to false, but I did find a string in some of our test text which will generate an error in the spellchecker:

   <a href="foo


  
  25 Apr 2007, 6:03 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: Spell As You Type using two different dictionaries on the same page?

Try setting IgnoreHtmlTags property of your UltimateSpell control to False if you try to ignore tags that are not well-formed (having no closing > character in your case).


  
  26 Apr 2007, 11:29 AM
mlin is not online. Last active: 6/29/2007 1:45:34 PM mlin

Top 10 Posts
Joined on 04-23-2007
Posts 7
Re: Spell As You Type using two different dictionaries on the same page?
Okay.  When the IgnoreHtmlTags property of the UltimateSpell control is set to false, then the malformed HTML string doesn't cause the spellchecker to generate an error with SpellAsYouType set to false; but I still get the exception when the IgnoreHtmlTags property is set to false and SpellAsYouType is set to true.
  
  26 Apr 2007, 12:04 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: Spell As You Type using two different dictionaries on the same page?
We are confused, are you saying that "when the IgnoreHtmlTags property is set to false" or true? The bottomline is you have to set IgnoreHtmlTags to true if there is a possibility that there might be malformed HTML in the text because UltimateSpell assumess the text will have valid HTML. If you send us your sample code, we can try to reproduce the behavior in our test system.
  
  21 Jun 2007, 4:39 PM
mlin is not online. Last active: 6/29/2007 1:45:34 PM mlin

Top 10 Posts
Joined on 04-23-2007
Posts 7
Re: Spell As You Type using two different dictionaries on the same page?

The state of the IgnoreHtmlTags seems to be irrelevant, since I've now observed the same error with other test data which does not include any malformed HTML.

Do you have an address to which I can email an attachment?


  
 Page 1 of 1 (13 items)
Karamasoft Support Forums » General Discussions » UltimateSpell » Re: Spell As You Type using two different dictionaries on the same page?

You can add attachments
You can post new topics
You can reply to topics
You can delete your posts
You can edit your posts
You can create polls
You can vote in polls
Forum statistics are enabled
Forum is unmoderated

© 2002-2020 Karamasoft LLC. All rights reserved.