ASP MVC - ConfigurationManager Cannot Find Applications

I use MS Test to verify one of my controller actions. This method uses ConfigurationManger to read appSettigns from web.config. For some reason, ConfigurationMangager cannot find application settings. In NUNIT, I just wanted to add a copy of the webconfig file to the test project so that it is available when working in this context. However, this does not work for me.

Can someone tell me what I need to do to make sure my web.config is where it should be when using the MS test?

+3
source share
1 answer

Try using app.config instead of web.config

+5

Source: https://habr.com/ru/post/1771817/


All Articles