今天在运行一个asp.net MVC项目的时候,提示如下的错误:

 

An error occurred while creating a controller of type 'FZPT.Controllers.BlogController'. If the controller doesn't have a controller factory, ensure that it has a parameterless public constructor.

 

 初看之下还以为是'FZPT.Controllers.BlogController'中缺少无参构造函数了呢,结果加上去也是不能够现实的。

最后,通过修改webconfig中的数据库连接字串,才得以运行起来。

看来,这提示有时候还是会误导人的,呵呵·~~~

posted on 2010-09-01 14:47  程序诗人  阅读(328)  评论(0编辑  收藏  举报