Copied to clipboard

Flag this post as spam?

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


  • satjinder 16 posts 28 karma points
    May 06, 2014 @ 11:52
    satjinder
    0

    Deploy custom controllers to Umbraco

    Hi,

    I have tried google and umbraco forums and end up reading countless blogs/posts but I could still not get the steps I need to deploy my custom controller. 

    I want to develop costom functionality in stnad alone mvc project and deploy it to an umbraco website. What I have tried so far is:

    1) Created MVC project and added a controller into it

    2) Added routes as OnApplicationStarted in global.asax.cs.

    3) Compiled and copied the DLL to umraco website's bin folder

    4) Copied Views to hte Views folder

     

    Now when i try go to my controller i.e. http:\\localhost\Test\Index, it gives me 404.

    What have I missed? 

    Any help will be greatly appreciated.

     

    Thanks

    Satjinder

  • Damian Green 452 posts 1433 karma points
    May 09, 2014 @ 01:59
    Damian Green
    0

    Hi,

    For starters you need to ensure you exclude the route from being handled by umbraco by editing the web.config umbracoReservedUrls and adding your route.

    I can't remember if I've ever used a pure mvc controller though... i normally use surface controllers or you have the umbracoapicontroller (webapi) which allows umbraco to handle the routing for them. Give it a whirl with something basic once you have reserved the url.

    Does this help any?

    Damian

Please Sign in or register to post replies

Write your reply to:

Draft