开发者

ASP MVC - ConfigurationManager Cannot find Appsettings

I am using MS Test to test one of my controller's actions. This method uses the ConfigurationManger to read appSettigns from the web.config. For some reason ConfigurationMangager is not able to find the appsettings. In NUNIT I would just make sure to add a copy of the webconfig file to the test project so that it is available when running in that context. However this is not working for me.

Can someone tell me what I need to do to 开发者_JS百科make sure my web.config is where it needs to be when using MS test?


Try using app.config instead of web.config

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜