Surface controller - No route in the route table matches the supplied values.
I’ve built a surface controller that works fine on my development machine (using Visual Studio 2010) however when moving it to the server I get the message
"No route in the route table matches the supplied values."
Failing on this line of code
@Html.Action("MemberList", "MemberSurface")
I’ve migrated it to the server by copying the files across (models, views, controllers, template files) to the server and creating the content in the same way.
If I use the sledgehammer-to-crack-a-nut method of copying the whole project/website from dev machine to the server then it will work. This leads me to think that I must be missing something else when copying the files across. Global.asax looks the same and I can’t see any clues in web.config.
I’ve got a feeling I must be doing something really silly. Can anyone point me in the right direction?
I’m using version 6.16 MVC mode. It’s not a plugin surface controller and I’m not using Areas
I hope this isn't pointing out something really silly... but normally controllers and models will be compiled and it's the dlls in the bin folder you need to deploy not the .cs source files. The only exception to this is if everything is in App_Code. Apologies if that what you meant when you said "copying the files across", but thought would just check...
I was indeed doing something silly - Andy thanks for diplomatically pointing it out.
I'm so used to supporting a ASP.NET webforms website where you just copy across the aspx.cs files that I totally forgot that web application projects work differently.
Surface controller - No route in the route table matches the supplied values.
I’ve built a surface controller that works fine on my development machine (using Visual Studio 2010) however when moving it to the server I get the message
"No route in the route table matches the supplied values."
Failing on this line of code @Html.Action("MemberList", "MemberSurface")
I’ve migrated it to the server by copying the files across (models, views, controllers, template files) to the server and creating the content in the same way. If I use the sledgehammer-to-crack-a-nut method of copying the whole project/website from dev machine to the server then it will work. This leads me to think that I must be missing something else when copying the files across. Global.asax looks the same and I can’t see any clues in web.config.
I’ve got a feeling I must be doing something really silly. Can anyone point me in the right direction?
I’m using version 6.16 MVC mode. It’s not a plugin surface controller and I’m not using Areas
thanks
I hope this isn't pointing out something really silly... but normally controllers and models will be compiled and it's the dlls in the bin folder you need to deploy not the .cs source files. The only exception to this is if everything is in App_Code. Apologies if that what you meant when you said "copying the files across", but thought would just check...
Andy
I was indeed doing something silly - Andy thanks for diplomatically pointing it out. I'm so used to supporting a ASP.NET webforms website where you just copy across the aspx.cs files that I totally forgot that web application projects work differently.
Have copied the dll across and now working fine.
is working on a reply...