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

0

I am getting the following error when I am trying to invoke a method of a web-api from POSTMAN, I am using the localhost url , please can anybody help with a possible solution.

{
"Message": "An error has occurred.",
"ExceptionMessage": "An error occurred when trying to create a controller of type 'BurnController'. Make sure that the controller has a parameterless public constructor.",
"ExceptionType": "System.InvalidOperationException",
"StackTrace": "   at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)\r\n   at System.Web.Http.Controllers.HttpControllerDescriptor.CreateController(HttpRequestMessage request)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()",
"InnerException": {
    "Message": "An error has occurred.",
    "ExceptionMessage": "Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)",
    "ExceptionType": "System.IO.FileLoadException",
    "StackTrace": "   at BurnStatusAPI.Controllers.BurnController..ctor()\r\n   at lambda_method(Closure )\r\n   at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)"
}
}

Thanks in advance :)

visual-studio
postman
webapi
asked on Stack Overflow Oct 7, 2020 by Priyanka • edited Oct 8, 2020 by Wowo Ot

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0