This is a migrated thread and some comments may be shown as answers.

RadSpell Javascript Error

8 Answers 287 Views
Spell
This is a migrated thread and some comments may be shown as answers.
Will
Top achievements
Rank 1
Will asked on 03 Sep 2009, 09:33 PM

I am receiving the following javascript error when clicking on the RadSpell button and the control is placed on a page that is configured with forms authentication in the web.config:

 

 

Message: Sys.ArgumentException: Cannot deserialize. The data does not correspond to valid JSON.

Parameter name: data

Line: 4723

Char: 21

Code: 0

URI: http://localhost/ScriptResource.axd?d=ryM-v-atWyafyRba-J4cHMmodSS-DVBnOhmaxNYGoPR8dRTdvokZrasX9uQLzL3Wl7dgKSsFPn6IJHWdrzJk_1bOgV6KrLCExaizZfaNpIQ1&t=ffffffffe5f2f277

 

When the location element is removed from the web.config, the spell check works.

 

Below are the relevant web.config settings:

 

  <location path="MyPage.aspx">

    <system.web>

      <authorization>       

        <allow roles="MyRole" />

        <deny users="*" />

      </authorization>

    </system.web>

  </location>

 

<system.web>

    <httpHandlers>

      <remove path="*.asmx" verb="*" />

      <add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />

      <add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />

      <add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />

      <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />

      <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />

    </httpHandlers>

</system.web>

 

This is the page markup:

 

<asp:TextBox ID="txtMyTextBox" runat="server" TextMode="MultiLine" />

<telerik:RadSpell ID="rsRadSpell" runat="server" ControlToCheck="txtMyTextBox" SupportedLanguages="en-US,English" />

 

I found a similar thread from last year, and the recommended solution was to reboot and add the handlers with the smart tag.  This did not work for me, and the problem has occurred on multiple computers.  I would appreciate any help with this problem.

 

Thanks,

 

Will

8 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 04 Sep 2009, 07:31 AM
Hi Will,

You need to add location for the spellcheck handler and telerik's resources in your web.config file so they are available for all users.
e.g.
<location path="Telerik.Web.UI.WebResource.axd"
   <system.web> 
     <authorization> 
       <allow users="*"/> 
     </authorization> 
   </system.web> 
 </location> 
<location path="Telerik.Web.UI.SpellCheckHandler.axd"
   <system.web> 
     <authorization> 
       <allow users="*"/> 
     </authorization> 
   </system.web> 
</location> 
    


Greetings,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Will
Top achievements
Rank 1
answered on 04 Sep 2009, 02:10 PM

Georgi,

 

 

Thanks for your response.  However, that did not fix the problem.  I also added the following without any luck:

 

 

  <location path="Telerik.Web.UI.DialogHandler.aspx">

    <system.web>

      <authorization>

        <allow users="*"/>

      </authorization>

    </system.web>

  </location>

 

Are there any other recourses that all users need access to?

0
Lini
Telerik team
answered on 08 Sep 2009, 07:25 AM
Hi Will,

The only way to reliably trace this problem is to use a HTTP debugging proxy (Fiddler for IE, Firebug's Net panel for Firefox) and see what is the server response for the Telerik.Web.UI.SpellCheckHandler.axd request. If it contains exception information, then the problem is with the server-side spell check - for example the custom dictionary might contain invalid words. In this case, removing the custom dictionary will fix the problem. If the spell check handler response contains a different page (e.g. a login page), then you need to make sure it is not redirected - double check your web.config file and the handler's <location> element, exclude it from any third party http modules (e.g. URL rewriting), make sure that it is registered in the correct place (<system.webServer> for IIS 7 integrated mode or <system.web> otherwise).

All the best,
Lini
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Will
Top achievements
Rank 1
answered on 08 Sep 2009, 03:11 PM

Lini,

 

Thank you very much for your debugging suggestion.  A look at the requests in fiddler showed my problem.  I had given authorization to SpellCheckHandler.axd from the root of the application, but the true request to the Axd included the path to the page that was requested.  So the solution was to replace this:

 

<location path="Telerik.Web.UI.SpellCheckHandler.axd">

 

with this:

 

<location path="MyFolder/Telerik.Web.UI.SpellCheckHandler.axd">

 

Thanks again,

 

Will

0
Assaf
Top achievements
Rank 1
answered on 02 Sep 2010, 06:52 AM
I just came across the same issue.

I found out that this error always raised when using the URL rewriting feature (dot.Net 4.0) .
When the page where the editor control is located being accessed using the mapped route, the SpellCheck always fail. When the page is accessed using its actual URL the SpellCheck runs successfully.

Assaf.
0
Rumen
Telerik team
answered on 02 Sep 2010, 11:25 PM
Hi Assaf,

Can you please replace the ashx extension of the Telerik.Web.UI.SpellCheckHandler handler in the web.config file

<add path="Telerik.Web.UI.SpellCheckHandler.ashx" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false"/>

with axd, e.g.
 
<add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />

and set the AjaxUrl property inline in the RadSpell declaration:

<telerik:RadSpell id="RadSpell1" AjaxUrl="~/Telerik.Web.UI.SpellCheckHandler.axd" runat="server" ControlsToCheck="TextBox1" />

All the best,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Assaf
Top achievements
Rank 1
answered on 03 Sep 2010, 03:40 PM
Rumen,

Thank you for your prompt response.

Adding a telerik:RadSpell does work with URL Rewriting but adds a new button to form.

Is there a way to make this work with the integrated spell check button?
I tried setting the AjaxUrl of the editor's SpellCheckSettings property but that did not work (same error message):

<telerik:RadEditor ID="txtDoc" runat="server" Height="700px" Width="100%" Skin="Windows7">
  <SpellCheckSettings AjaxUrl="Telerik.Web.UI.SpellCheckHandler.axd" />
  ...

Regards,

Assaf


0
Rumen
Telerik team
answered on 06 Sep 2010, 03:35 PM
Hello Assaf,

The solution should work with the inline spellchecker of RadEditor.

Nevertheless, you can fire the standalone and hidden spellchecker from a custom RadEditor button using the solution provided in this KB article: Using RadSpell "Prometheus" dialog with RadEditor "Prometheus" as a custom tool.

Greetings,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Spell
Asked by
Will
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Will
Top achievements
Rank 1
Lini
Telerik team
Assaf
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or