报错如下:
翻译一下:
An unhandled exception occurred while processing the request.
InvalidOperationException: Multiple constructors accepting all given argument types have been found in type ‘NewPublic.Controllers.HomeController’. There should only be one applicable constructor.
一开始找这个报错找了半天,才发现我后台有两个构造函数:
整合一下,或者删掉一个构造函数就好了,如下:
ok,再次运行,恢复正常。