确保控制器具有无参数的公共构造函数?

编程入门 行业动态 更新时间:2024-10-08 19:44:15
本文介绍了确保控制器具有无参数的公共构造函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

当我在本地运行时,我只是遇到了一个奇怪的问题,如果我单击将我带到控制器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 :)

更多推荐

确保控制器具有无参数的公共构造函数?

本文发布于:2023-11-17 10:59:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1609797.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:器具   有无   函数   参数

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!