Last post Jun 16, 2016 03:06 AM by Yohann Lu
Jun 15, 2016 10:01 AM|Omkar Mhaiskar|LINK
I am creating one WebAPI application, for this I have refer below url for first 3 days tutorials.
Then i have to implement owin authentication in the Webapi so for this i have refered below article,
everything is done. SO I run the application. just call one controller(no authorise attribute) method for returning dummy values. for its giving me error of "An error occurred when trying to create a controller of type ''. Make sure that the controller has
a parameterless public constructor." for this i have checked unity config. boostrapper class. but no luck can anyone help me to resolve this error.
Thanks in Advance.
Jun 15, 2016 10:54 AM|mithunvp|LINK
I think your using UNITY, registering of controller is not proper in unity config. It actually needs controller instance created but its not happening here.
Post necessary code to get clear idea i.e. unity config, controller, web api bootstarp classess
Jun 16, 2016 03:06 AM|Yohann Lu|LINK
Hi Omkar Mhaiskar,
As far as I know, maybe you have missed defining a parameterless constructor in some class(Used in the controller or the controller itself)
public ValuesController() : base()
You can also refer the following post solutions.
Web API 2.0 - An error occurred when trying to create a controller of type: