A couple of things, when you say upgrade what do you mean, if you've upgraded using nuget or something? You cannot upgrade from 7 to 8, at least not easily, nor recommended. You would need to start a new project and migrate content etc.
It's been a while since I've used App_Code so I would recommend moving controllers into their own /controllers/ folder.
It would help to know what you're doing with this Surface controller, especially as you're expecting, 'ContentModel' being passed in.
Finally your error mentions MySurfaceController but your class is called StoreFinderController
I don't think the upgrade/migration part is the problem as I following all the Umbraco guidelines.
I don't normally use App_Code either but it's an inherited project.
Ignore the MySurfaceController thing (I was trying to simplify the example).
The issue seems related to dependency injection, as the stack trace bombs on LightInject with an "unable to resolve type" error. This would suggest that the SurfaceController isn't registered in the DI pipeline at the point it tries to access it (I'm assuming App Start).
Thanks for taking the time to respond. Any help is appreciated.
Error with SurfaceControllers in 8.15.1
After upgrading a recent site from 7.5.4 - 8.15.1 it went through staging then live.
Once it hit live the following error intermittently appears:
Code is in the App_Code folder. I haven't seen this issue before, can anyone help please?
MySurfaceController looks like this:
Stack trace:
Hi Brendan,
A couple of things, when you say upgrade what do you mean, if you've upgraded using nuget or something? You cannot upgrade from 7 to 8, at least not easily, nor recommended. You would need to start a new project and migrate content etc.
It's been a while since I've used App_Code so I would recommend moving controllers into their own /controllers/ folder.
It would help to know what you're doing with this Surface controller, especially as you're expecting, 'ContentModel' being passed in.
Finally your error mentions
MySurfaceController
but your class is calledStoreFinderController
Good luck,
Jamie
Hi Jaime,
I don't think the upgrade/migration part is the problem as I following all the Umbraco guidelines.
I don't normally use App_Code either but it's an inherited project.
Ignore the MySurfaceController thing (I was trying to simplify the example).
The issue seems related to dependency injection, as the stack trace bombs on LightInject with an "unable to resolve type" error. This would suggest that the SurfaceController isn't registered in the DI pipeline at the point it tries to access it (I'm assuming App Start).
Thanks for taking the time to respond. Any help is appreciated.
Hello Brendan Rice,
I'm facing the exact issue with my Umbraco 8 Solution. Did You manage to solve this mycardstatement - if so, would You care to share...?
No luck yet Larry. The issue has stabilised but if I frig with the Web.Config it'll blow up again.
It seems like something to do with the way Umbraco is handling the Dependency Injection around surface controllers.
Hi Brendan,
You could try to register the controller via a Composer to see if this fixes your issue.
You can do something like this:
I found this in a issue op umbraco github: https://github.com/umbraco/Umbraco-CMS/issues/7704
is working on a reply...