Copied to clipboard

Flag this post as spam?

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


  • hrcodenstuff 6 posts 128 karma points
    Nov 26, 2016 @ 13:22
    hrcodenstuff
    0

    Cannot get surface controller to find template on server

    I am attempting to develop a simple contact form for a client. Following instructions in the documentation, I created a ViewModel, Surface Controller, and View of a simple form and tested it on my local development machine. It works fine there.

    However, when I moved all of this to the production server, I continue to get "No physical template file was found for template Index" message.

    Short of building a custom router, I've tried everything I know to try, including rebuilding the template on the production server, moving the template to various locations under Views, etc.

    Why would there be a difference between my machine and the production server? Shouldn't it work the same?

  • Dennis Adolfi 1082 posts 6447 karma points MVP 5x c-trib
    Nov 26, 2016 @ 13:37
    Dennis Adolfi
    0

    Hi hrcodenstuff.

    Could you please paste in your controller, viewmodel and view code?

    Also, have you deployed your .dll files in the bin folder, and not just the view?

  • hrcodenstuff 6 posts 128 karma points
    Nov 26, 2016 @ 13:40
    hrcodenstuff
    100

    What .dll files?

  • hrcodenstuff 6 posts 128 karma points
    Nov 26, 2016 @ 14:12
    hrcodenstuff
    1

    Dennis, thanks for pointing to the obvious - I uploaded the updated project .dll files and it worked! Sometimes, when looking at trees, it takes someone else to point out you're in a forest. Thank you!

  • Dennis Adolfi 1082 posts 6447 karma points MVP 5x c-trib
    Nov 26, 2016 @ 14:13
    Dennis Adolfi
    0

    Awesome, happy it works for you!! Have a great weekend!!

  • Dennis Adolfi 1082 posts 6447 karma points MVP 5x c-trib
    Nov 26, 2016 @ 14:12
    Dennis Adolfi
    0

    When you build your solution locally, all your custom .cs files such as your controllers, are compiled into .dll files and located in the /bin folder. If you haven't deployed your .dll files to the production server, that would explain why your controller doesn't get routed on the production server but works locally.

    Deploy your .dll files, especially the one with the same name as your UmbracoSite, example: MyWebsite.dll.

Please Sign in or register to post replies

Write your reply to:

Draft