3

An error occurred during migration MongoDB data to XConnect. The same issue was registered but out of the Sitecore stack exchange.

https://stackoverflow.com/questions/48302183/sitecore-xconnect-an-error-occurred-when-trying-to-create-a-controller-of-type

{"Message":"An error has occurred.","ExceptionMessage":"An error occurred when trying to create a controller of type 'ContactsController'. 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 Sitecore.XConnect.Web.DependencyInjection.WebApiServiceControllerActivator.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.d__1.MoveNext()","InnerException":{"Message":"An error has occurred.","ExceptionMessage":"Type 'Sitecore.XConnect.Web.Controllers.ContactsController' 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)"}}

  • Did you get the reason of above error? I am experiencing same issue. – Pawan Gupta Aug 14 at 7:24
  • nothing helped until I reinstalled xconnect – Vlad Shpak Aug 14 at 9:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.