Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dhruv Patel 4 posts 74 karma points
    Apr 11, 2018 @ 12:33
    Dhruv Patel
    0

    Debug or calling of controllers of Surface controllers

    How to call or debug the controllers which has inherited the Surface controllers?

    For e.g. http://localhost:12345/BlogSurface controller unable to call or debug when this url gets hit in browser.

  • Michaël Vanbrabandt 863 posts 3343 karma points c-trib
    Apr 11, 2018 @ 12:35
    Michaël Vanbrabandt
    0

    Hi Dhruv,

    take a look at this in the docs:

    https://our.umbraco.org/documentation/reference/routing/surface-controllers#routing-for-locally-declared-controllers

    Here you will see the url for locally routed surface controllers, or here:

    https://our.umbraco.org/documentation/reference/routing/surface-controllers#routing-for-plugin-based-controllers

    For plugin based surface controllers.

    For debugging, if you use Visual Studio, you have an option to apply brakepoints in your solution where you would like to start debugging.

    Hope this helps.

    /Michaël

  • Michaël Vanbrabandt 863 posts 3343 karma points c-trib
    Apr 15, 2018 @ 11:39
    Michaël Vanbrabandt
    0

    Hi Dhruv,

    any news on this? Did you managed to solve the issue?

    Can you report this back to the forum?

    Thanks!

    /Michaël

  • Dhruv Patel 4 posts 74 karma points
    Apr 16, 2018 @ 04:25
    Dhruv Patel
    0

    No, pls explain in detail as i am unable to call that particular controller. Also give its demo code.

  • Dave Woestenborghs 3325 posts 11170 karma points MVP 5x admin c-trib
    Apr 16, 2018 @ 06:15
    Dave Woestenborghs
    0

    Hi,

    Have a look at the docs for surface controllers : https://our.umbraco.org/documentation/reference/routing/surface-controllers#routing-for-locally-declared-controllers

    Surface controllers are auto routed. So they do not use a normal MVC route.

    To hit your controller action directly from the browser ;

    /umbraco/surface/blogsurface/{actionName}
    

    Be aware that by doing this you don't have a umbraco content item and the culture will always be the culture of your server.

    Dave

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies