ASP.NET MVC - Captcha as stand-alone assembly -
I have implemented the captcha for the form submission page in my app asp.NET MVC framework < / Em> book
There is a tip in it that says "If you want to convert it to a reusable, distributed captcha component ... you only have to put CaptchaHailer and Captcha image controller class in a single Assembly. "
What does this mean?
I was thinking that I will just create a new MVC project, in this it is just a compiler in the controller folder, and the Assistant File Helper Folder compile it just fine.
Then I include that project in my solution and have added the references to this project in both of my sub-projects (one for business layer, one for the UI).
But when I try to submit the page, the view can not render the captcha image (BTW, it worked fine before breaking it into a separate project.)
< P> View page is unable to find captcha controller.I think I need help creating a stand-alone controller ...
thanks, Scott
has an error:
Castle.MicroKernel.ComponentNotFoundException: No components to support the service captcha. Capt.Captimage controller was found at WebUI.WindsorControllerFactory.GetControllerInstance in Castle.Windsor.WindsorContainer.Resolve (Type Service) in Castle.MicroKernel.DefaultKernel.get_Item (Type Service) (SystemContentController on System.Web.Mvc.MvcHandler.ProcessRequest ( RequestContext RequestContax, String ControllerName) on line CI: \ work_aspx \ PostHealthWellness \ WebUI \ WindsorControllerFactory.cs: Write to line 48. System.Web.Mvc.MvcHandler.ProcessRequest (HttpContextBase httpContext) System.Web.Mvc.MvcHandler.System. Web.IHttpHandler.ProcessRequest (HttpContext httpContext) system.HttpApplication.IExecutionSte System.Web.HttpApplicat on Web.HttpApplication.CallHandlerExecutionStep.System.Web Ion.ExecuteStep (IExecutionStep step, Boolean & amp; at p.Execute (full synchronous)
Create a standard class library project with two files. Add the necessary reference (MVC ...) to compile it. Add the compiled DLL as a reference to your main Web application.
Comments
Post a Comment