开发者

IIS Express No AppSettings

I am running a .NET 4.0 Web Application. Under IIS Express ( and only IIS Express ) none of my APPSettings are read into the AppSettings collection. When I look into this collection it is empty even though I have about 15 app settings in the web.config. Any sugguestions on what is going on?

This is a Web Application project. I am usi开发者_如何学编程ng web.config transformations but I believe those only are used when publishing.


One thing I've discovered that can cause appsettings not to load this is having a virtual directory nested in another directory

http://localhost:8181/xproject/mysite

changing it to

http://localhost:8181/xproject_mysite

fixed it for me.

I have no idea why though.


Make sure that the the appSettings element in the web.config is a child element of the configuration element.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜