0

I am using Ninject for DI (with MVC3), its working fine on my development environment, but on the server it's giving this error:

An error occurred when trying to create a controller of type 'Mynamespace.MyController'. Make sure that the controller has a parameterless public constructor.

I spent the last 3 hours searching for answers and applying them, such as changing some code and checking that all required DLLs are uploaded.

But I'm still unable to find a solution.

Its working fine on my local environment, I am only facing this issue on the server.

EfrainReyes
  • 1,005
  • 2
  • 21
  • 55
Dr. Rajesh Rolen
  • 14,029
  • 41
  • 106
  • 178
  • Could you please provide some sample code with your bindings and the controller in question? – cvbarros Jan 26 '14 at 11:13
  • Since it's working fine locally, i would suggest that there is an issue with deployment. The assembly might not be loaded. Can you try out and see whether the same error will occur in case the assembly is not loaded (for a different controller from a different assembly, of course) - or check the source code? – BatteryBackupUnit Jan 27 '14 at 06:25

0 Answers0