RadSpell in IIS7 Integrated Mode

3 posts, 0 answers
  1. Craig
    Craig avatar
    6 posts
    Member since:
    Jan 2012

    Posted 03 Apr 2014 Link to this post

    We are moving our application towards MVC.
    MVC requires Integrated mode to work normally.

    I changed all our Telerik handlers and modules in the web config like so.

          <add name="ChartImage.axd_*" path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode" />
          <add name="Telerik.Web.UI.SpellCheckHandler.axd_*" path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode" />
          <add name="Telerik.Web.UI.DialogHandler.aspx_*" path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode" />
          <add name="Telerik.RadUploadProgressHandler.ashx_*" path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI" preCondition="integratedMode" />
          <add name="Telerik.Web.UI.WebResource.axd_*" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" preCondition="integratedMode" />
    <modules runAllManagedModulesForAllRequests="true">
          <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI" preCondition="managedHandler" />

    I modified the control tag to be so (I added the HandlerUrl)
    <Telerik:RadSpell ID="RadSpell1" runat="server" ButtonType="None" AllowAddCustom="false"
        Language="en-CA" HandlerUrl="~/Telerik.Web.UI.SpellCheckHandler.axd" />

    In the code behind we do a little customization.
    'Script file to remove js alert and confirm dialogs
    RadSpell1.DialogsScriptFile = CType(Page.Master, BaseMaster).AppendVersion("~/scripts/RadSpellFIX.js")
    'Style to make spellcheck buttons larger
    If Request.Cookies("theme") IsNot Nothing AndAlso Request.Cookies("theme").Value = "nightmode" Then
        RadSpell1.DialogsCssFile = CType(Page.Master, BaseMaster).AppendVersion("~/style/SpellCheckPopupStyle-night.css")
        RadSpell1.DialogsCssFile = CType(Page.Master, BaseMaster).AppendVersion("~/style/SpellCheckPopupStyle.css")
    End If
    'Replacing default spell check engine withOpenOffice one.
    RadSpell1.SpellCheckProviderTypeName = GetType(Telerik.Web.UI.NHunSpellCheckProvider).AssemblyQualifiedName
    RadSpell1.OnClientCheckFinished =
        "function(sender, args) {" & _
            "args.suppressCompleteMessage = true;" & _
            "$('<div>Spell Check completed successfully.</div>').dialog({" & _
                "autoOpen: true," & _
                "modal: true," & _
                "title: 'Spell Check complete'," & _
                "buttons: { 'OK': function () { " & _
                    "$(this).dialog('close'); " & _
                    String.Format("$('#{0}').click();", butPushUndoStackExternal.ClientID) & _
                "} }" & _
            "});" & _

    However I get this odd error.

    Cannot read the configuration/dictionary language parameters! 

    I used fiddler to have a look at what we are sending and it is doing a get
    Accept: text/html, application/xhtml+xml, */*
    Accept-Language: en-CA
    User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
    Accept-Encoding: gzip, deflate
    Host: localhost
    Connection: Keep-Alive
    Cookie: ASP.NET_SessionId=v2hx0j0y3ukj300ckgvnpl40

    I'm not sure what is going wrong here. I have breakpoints in my SpellCheck provider but they are not getting hit.

  2. Marin Bratanov
    Marin Bratanov avatar
    4428 posts

    Posted 04 Apr 2014 Link to this post

    Hello Craig,

    Let me start by pointing out the the UI for ASP.NET AJAX is not tested and supported in MVC environments and we cannot guarantee its functionality: http://www.telerik.com/help/aspnet-ajax/mvc-integration-with-telerik-ui-for-aspnet-ajax.html.

    Otherwise, things seem OK, but here are my suggestions:

    • add a <remove> clause before adding the spellcheck handler to make sure there are no other registrations
    • make sure the handlers are excluded from routing
    • make sure the en-CA dictionary file is present in ~/App_Data/RadSpell
    • make sure the application pool identity has read-write access to this folder
    • make sure ~/App_Data/RadSpell is also excluded from routing (e.g., casing is not changed)
    • make sure session is not cookieless (it seems it is not, but just in case)
    • if in a webfarm/garden scenario, make sure the machineKeys for all servers are the same so all of them can decode the request. Also, make sure all servers have the dictionaries and the folders are accessible without URL modifications.
    • try adding a location element to allow access to the handlers for all users. It seems available yet some other permissions may be kicking in.
    • remove compression if it is being used in case it causes data to be unreadable
    • try using the Telerik.Web.UI.SpellCheckHandler.ashx path for the control's handler (and, of course, in the control's markup)
    • try removing the customizations you have and the more complex providers to see if the issue stems from them.

    I hope that at least one of these suggestions helps. Over the years we've had only a couple of reports about this problem and it seems that it has been caused by an application conflict, not by the control itself.


    Marin Bratanov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. Craig
    Craig avatar
    6 posts
    Member since:
    Jan 2012

    Posted 04 Apr 2014 in reply to Marin Bratanov Link to this post

    Thanks for the response Marin.

    I'll be going through these recommendations. I should also mention (in case someone else is experiencing this issue and is still unable to get the control working in Integrated Mode) that I was able to easily get MVC working in classic mode by following the steps indicated here.

Back to Top