When trying to run a model via the Mo.Net Quotation Service, you may receive the following error:


{

"Message": "An error has occurred.",

"ExceptionMessage": "An error occurred when trying to create a controller of type 'QuotesServiceController'. 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__1.MoveNext()",

"InnerException": {

"Message": "An error has occurred.",

"ExceptionMessage": "Type 'Sal.Quotes.QuotesService.WebApiHost.QuotesServiceController' does not have a default constructor",

"ExceptionType": "System.ArgumentException",

"StackTrace": " at System.Linq.Expressions.Expression.New(Type type)\r\n at System.Web.Http.Internal.TypeActivator.Create[TBase](Type instanceType)\r\n at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.GetInstanceOrActivator(HttpRequestMessage request, Type controllerType, Func`1& activator)\r\n at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)"

}

}


To correct this issue, do the following:


1. Navigate to C:\ProgramData\Software Alliance\Quotations Service.

2. In the Quotations Service folder, delete the auditor.xml file.

3. Restart the Mo.net RESTful Quotations Service.


You should now be able to run the model without this error.