Make sure the controller has a hassle-free public constructor?

I got this strange problem when I run locally, and if I click on the link that leads me to the X controller, it will work, but after publishing it to windows azure I get this error when I click the same link:

An error occurred while trying to create a controller of type 'Prodject.Controllers.ControllerX. Make sure the controller has an unsigned public constructor.

The same goes for all the other links that lead me to this particular controller any ideas?

Not sure how much more information I can give, as this is the only information I think I can get.

And no, this is not an API controller

Thank you for reading my post and leisurely to help me!

0
c # asp.net-mvc azure
May 25 '15 at 9:48
source share
2 answers

Thanks to Rahul Nikate, I found that the problem appeared to be with a problem for one of the class constructors inside the X controller, such seams like Cijo VJ were half right :)

0
May 25 '15 at 10:27
source share

Perhaps you missed the definition of an arbitrary constructor in a certain class (used in the controller or the controller itself), where you defined the constructor with a parameter. And then try to instantiate the class without parameters.

+1
May 25 '15 at 9:57
source share



All Articles