machine.config appSettings are null

ⅰ亾dé卋堺 提交于 2019-11-30 19:10:41

You probably put it in the wrong machine.config. Remember that there is the same machine.config for .NET 2.0 and 3.5 as they both target CLR 2.0 (c:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\) and a separate machine.config for .NET 4.0 (c:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\).

Also remember that if you are running a 64 bit OS the folders are c:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG\ and c:\Windows\Microsoft.NET\Framework64\v4.0.30319\CONFIG\ respectively. So make sure you have put the key in the correct machine.config that correspond to the framework version you are targeting in your ASP.NET application as well as the x86 or x64 bit.

So you get a machine.config per CLR version and bitness (no idea if such word exists).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!