Strange issue when POSTing to MVC widget's controller action.
I'm having trouble getting a POST request to a controller action in an MVC widget to function. Running the project in debug allows me to see that the code in the action, and then in the view, is all run perfectly fine without any problem. But some time after the view finishes being run, Sitefinity returns a 404 instead of the view. Can anyone help with this? It's very urgent that we get this fixed and these kinds of issues seem to be constantly popping up with Sitefinity.
The problem is that the error is occurring after my code has already run, so I have no idea WHERE the real problem is. There is no exception details or anything of the sort, so I have no clue where to even begin.
That said, when in Debug mode, after the view is rendered Visual Studio is asking me for the location of a file called "OpenAccessDataProvider_82b1799c64a76a459b11ff0000693a07.ascx"
What does this mean, am I missing a file somehow?
(I'm using Sitefinity v8.2)
Edit: Oh, and probably worth mentioning that the error occurs regardless of what I put in the action or the view, an empty action returning an empty view still produces this error.
See attached image for the 404 screen I'm seeing.
Really hoping someone can help with this? These kinds of bug seem incredibly common in Sitefinity and always cause us major delays, and it's embarrassing having to explain to my managers why I suggested Sitefinity as our CMS when I'm constantly being held up by Sitefinity glitches.
Yep, i have the same problem, with my custom events, but... only with sites about like that:
urlMySite:port/Post/Post-About-something
'cause when i have the next example, my controllers works
urlMySite:port/MyCustomModule
Hi,
I have tried this on my end and the Post action is working as expected on my end. In fact there are several MVC widgets in Sitefinity that also utilize post actions. One such would be the MVC Form widget: https://github.com/Sitefinity/feather-widgets/blob/d66ba87970badca66e637bfda64def97ff9f7c5d/Telerik.Sitefinity.Frontend.Forms/Mvc/Controllers/FormController.cs
Would it be possible to share the code of the controller to inspect and try on my end. If you are concerned about sensitive information feel free to open a support ticket and share the code there.
Regards,
Velizar Bishurov
Telerik
I have the same problem. My controller action should be the same for both GET and POST, but i get the 404 error when I try to POST. I've tried creating a separate action but it is redundant and doesn't allow to have the same method signature. Setting the ActionName or Route attribute on the POST doesn't work.
Is there a way to fix this? Or should I just give up on trying to work with MVC and learn Webforms instead?
=== EDIT ===
Found that setting EnableBackwardCompatabilityForPagesUrls to true in Advanced Settings for Pages solves the problem.