One of the solutions for "No parameterless constructor defined for this object"

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Just lost a couple of hours to this vague error I got. I just added a entry to the settings table manually because the installer for the plugin already had run. Everything was running fine afterwards.
However after a workerproces reset (iisreset/reboot) I was getting above error.
If you encounter this, one possible solution could be to change the setting you just edited. I used 0 instead of false, thats why it couldn't map it with the settings class for my plugin.

Kind regards
12 years ago
Why -1 me ?
It is very important to have a good knowledge base, and one of those things to have a possible resolution for common (vague) exceptions...
12 years ago
Hi stephen.maij

I am having this same problem.  The site will run fine for awhile and then suddenly throw this error after awhile.  Could you please go into more detail about your problem and how you resolved it, as I would love to resolve my problem as well!  It sounds like the exact same issue!

Thank you for this post!

Jody
12 years ago
Chalker wrote:
Hi stephen.maij

I am having this same problem.  The site will run fine for awhile and then suddenly throw this error after awhile.  Could you please go into more detail about your problem and how you resolved it, as I would love to resolve my problem as well!  It sounds like the exact same issue!

Thank you for this post!

Jody


Jody,

What kind of modifications have you made to the nopCommerce source code?


This error usually occurs when someone adds a new argument to a controller or service constructor and forgets to update the DependencyRegistrar class.

This can also occur if the DependencyRegistrar class was updated incorrectly. For example if you have a controller constructor like the following:


public Ctor(ISomeNewService someNewService){ ... }


and incorrectly map the new service in the dependency registrar like below


builder.RegisterType<SomeNewService>().As<SomeNewService>(); // Notice it is not registered AS ISomeNewService
12 years ago
Hi skyler.severns

Thank you very much for your help!   Maybe you can help me with this issue.   It appears that this error, "No parameterless constructor defined for this object." is occurring with every use of @Html.Action call.   Do you know why this would happen and possibly a way for me to resolve it?

Any help would be very appreciated!

Thanks,
Jody
12 years ago
Chalker wrote:
Hi skyler.severns

Thank you very much for your help!   Maybe you can help me with this issue.   It appears that this error, "No parameterless constructor defined for this object." is occurring with every use of @Html.Action call.   Do you know why this would happen and possibly a way for me to resolve it?

Any help would be very appreciated!

Thanks,
Jody


What controller are you calling Jody?
12 years ago
This issue is occurring when I call any of them.  Which leads me to believe that the error might actually be in the @Html.Action....but I'm new to MVC so it's only a hunch.   Any thoughts?
12 years ago
Did you edit some settings by yourself (in DB or thrue interface) ?
12 years ago
It appears that this problem occurs when there is an error on the website.  Once an error is pulled up it brings down the MVC until I recompile and re-publish the website.  Once the website is up and running smoothly we no longer has issue with this.   Very odd!!  Anyone else experience this?
12 years ago
Hi,

Yes, I'm also having the same problem. The site runs nicely for a while, then suddenly I get this error.
Any solution or clues?

Regards,
Rune
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.