The other method had been deprecated. Other than that, I just installed the Microsoft.AspNet.Mvc nuget package into the source, changed this line an built. Done!
No idea what the impact is of the Validate() change. I'm posting to a different controller through an ajax request. That one is properly routed so calling a "pure" (non-bridged) mvc action.
Cool, I didn't test this stuff with MVC 4, anyway, the AntiForgery.Validate that I used checks if the request contains the same token as the one you specified in the umbraco macro. If so, then it's a valid post else I use the get.
So in the case of 2 macro's with each it's own form, the correct form will get the postback the other will just do a get.
I your case, you will always be using the get method on the controller.
does not implement IController
I get this error when adding the macro to the page -
Everything seems to be inheriting properly in code... I'm not where the problem is.
Looks like I was just being stupid.
The path in my xcopy post build command was mis-spelled. =]
I am getting a null object reference now, but It's probably something I overlooked.
fyi - The null object reference was a missing connection string for my Linq to SQL DBModel context.
Great job on this project! You really have saved me some time!
Great to hear !
Cheeers,
Richard
Hmm, I get the same thing. The node in Umbraco it /getquote/, error:
Error loading Razor Script MvcRenderAction.cshtml
The controller for path '/getquote/' was not found or does not implement IController.
Macro (in quote.master):
<umbraco:Macro action="Index" controller="Quote" formtoken="QuoteForm" Alias="MvcRenderAction" runat="server"></umbraco:Macro>
Controller:
I must be missing something obivious, but I can't see it.. ?
Is it me trying to use MVC4? I'll try to recompile against 4 and see if that helps.
Yup, that was it. Had to change this one:
to just:
The other method had been deprecated. Other than that, I just installed the Microsoft.AspNet.Mvc nuget package into the source, changed this line an built. Done!
No idea what the impact is of the Validate() change. I'm posting to a different controller through an ajax request. That one is properly routed so calling a "pure" (non-bridged) mvc action.
Nice package Richard!
Hi Sebastiaan,
Cool, I didn't test this stuff with MVC 4, anyway, the AntiForgery.Validate that I used checks if the request contains the same token as the one you specified in the umbraco macro. If so, then it's a valid post else I use the get.
So in the case of 2 macro's with each it's own form, the correct form will get the postback the other will just do a get.
I your case, you will always be using the get method on the controller.
Cheers,
Richard
is working on a reply...