Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have this code for the sruface controller:
public class UserProfileSurfaceController : SurfaceController
public ActionResult TestAction()
I'm trying to access this through the url
But get returned with a 404 page.
Shouldn't it be possible to access the surface controller this way?
You have to call like this "http://localhost:51192/UserProfileSurface/TestAction".
When you want to call Action method from Ajax then you have to call with "/umbraco/Surface/UserProfileSurface/TestAction"
I think this is because you marked your action with the [HttpPost] attribute. This means it's only available for POST request. When you try to access it through your browser that is a GET request. Try to remove the [HttpPost] attribute or replace it with the [HttpGet] attribute.
Thank you suman and Dave for your reply.
Dave, you where right, I overlooked that part about post vs get, and got the response I needed from directly calling it.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted