我按照教程描述 here ,为了使 TinyMCE Spellchecker 在 Webforms 应用程序上工作。但是我尝试在 MVC 项目上做同样的事情,并且每次尝试使用拼写检查器时都会出现错误。
我想知道我需要进行哪些更改或调整才能在 ASP .NET MVC 项目中使用这个词。
我得到的错误如下:
[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)
最佳答案
好吧,在不知道您遇到的错误是什么的情况下很难知道问题是什么,但我猜这是因为您需要忽略到 MVC 中拼写检查器的路由。通过在你的 MVC 路由定义中添加类似的东西来做到这一点:
//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}");
如果没有上述内容,它会将拼写检查请求 url (
TinyMCE.ashx...
) 解释为 MVC 路由并尝试找到匹配的 Controller (显然会失败)。如果这不是问题,我建议发布一些有关您所看到的特定错误的更多信息。
关于asp.net - ASP .NET MVC 中的 TinyMCE 拼写检查器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1122659/