6

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)"}}

4
  • Did you get the reason of above error? I am experiencing same issue. Commented Aug 14, 2019 at 7:24
  • nothing helped until I reinstalled xconnect
    – Vlad Shpak
    Commented Aug 14, 2019 at 9:03
  • Ive got the same issue. How did you re-install just xconnect @VladShpak?
    – Steve Ward
    Commented Feb 18, 2020 at 22:43
  • @SteveWard Do not remember exactly. I think, I did whole re-install.
    – Vlad Shpak
    Commented Feb 24, 2020 at 9:40

2 Answers 2

0

check the password in the connectionstring.configs for the messaginguser match

  • xconnect\app_config\connectionstrings.config and
  • \app_config\connectionstrings.config
0

Check if the following services are running:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.