确保控制器具有无参数的公共构造函数? [英] Make sure that the controller has a parameterless public constructor?

查看:71
本文介绍了确保控制器具有无参数的公共构造函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在本地运行时,我只是遇到了一个奇怪的问题,如果我单击将我带到控制器X的链接,它可以工作,但是将其发布到Windows Azure之后,单击相同的链接时会出现此错误:

I just got this strange problem when I run locally and if I click on a link that takes me to controller X it works but after publishing it to windows azure I get this error when clicking the same link:

尝试创建类型的控制器时发生错误'Prodject.Controllers.ControllerX'.确保控制器具有无参数的公共构造函数.

An error occurred when trying to create a controller of type 'Prodject.Controllers.ControllerX'. Make sure that the controller has a parameterless public constructor.

将其他所有链接带到该特定控制器的链接也一样有什么想法吗?

Same goes for all other links that takes me to that specific controller any ideas?

不确定我能提供多少信息,因为这是我认为可以推迟的唯一信息.

Not sure how much more info I can give since this is the only information I think I can get a hold off.

不,它不是API控制器

And no it's not an API controller

感谢您阅读我的文章,并抽出宝贵的时间来帮助我!

Thank you for reading my post and taking your time to help me out!

推荐答案

感谢Rahul Nikate,我发现问题似乎是controllerX内部的类构造函数之一的路径存在问题,例如Cijo VJ的接缝右半:)

Thanks to Rahul Nikate i found the problem there seems to have been an issue with the pathing for one of the classes constructors inside the controllerX, seams like Cijo V J was half right :)

这篇关于确保控制器具有无参数的公共构造函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆