views:

1163

answers:

1

I followed the tutorial described here, in order to make the TinyMCE Spellchecker work on a Webforms application. But I tried to do the very same thing on a MVC project and keep getting errors every time I try to use the spellchecker.

I'd like to know what changes or adjustments I need to make in order to make this word on an ASP .NET MVC project.

The error I'm getting is the following:

[HttpException]: The controller for path '/TinyMCE.ashx' could not be found or it does not implement
 IController.
   at System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(Type controllerType)
   at System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String
 controllerName)
   at System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext)
   at System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext)
   at System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute
()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
+2  A: 

Well its a bit hard to know what the problem is without knowing what the error you're getting is, but I'm guessing that its because you need to ignore the route to the spell checker in your MVC. Do this by adding something like this to your MVC route definitions:

//ignore just the TinyMCE spell checker service:
routes.IgnoreRoute("TinyMCE.ashx");
//or if you want to be more general & ignore all ashx's:
routes.IgnoreRoute("{resource}.ashx{*pathInfo}");

Without the above it would be interpreting the spellcheck request url (TinyMCE.ashx...) as an MVC route & try to find a matching Controller (& obviously fail).

If that's not the issue, I'd suggest posting some more info about the specific error you're seeing.

Alconja
I'm sorry but it only says Error: on an alert javascript message.
Raúl Roa
If you install something like Firebug for Firefox or Fiddler, you should be able to see the actual ajax error coming back from the server.
Alconja
Sorry, I didn't actually test the rule... Should be enough just to ignore using `routes.IgnoreRoute("TinyMCE.ashx");` (if that doesn't work, try the second option I gave).
Alconja
Hi, I made it work thanks to your suggestion.
Raúl Roa
@Raul Roa: You made it work? Please say what changes you made so others may benefit who have the same issues. Thanks for being a good member of the ecosystem. :)
Pita.O