键在app.config中的运行时中不可用 [英] Keys are not available in the runtime in app.config

查看:90
本文介绍了键在app.config中的运行时中不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我在app.config中有大约8个键.但是在运行时,它仅显示5个键. ServerHostName,MasterConnString,DBName在运行时不可用.
这些密钥是新添加的.任何人都可以帮我.


Hi All

I have about 8 keys in app.config. But in the runtime it shows only 5 keys. ServerHostName,MasterConnString,DBName are not available in the runtime.
These keys are added newly.Can anyone help me.


<add key="ServerIPID" value="1" />
    <add key="Duration" value="2" />
    <add key="Encrypted" value="Yes" />
    <add key="OnlinePortalConnString" value="Data Source=DSRCV005\DSRCLMS;Database=OnlinePortal;uid=OnlinePortal;password=dsrc" />
    <add key="LMSPortalConnString" value="Data Source=DSRCV005\DSRCLMS;Database=KlassAktLMSPortal;uid=OnlinePortal;password=dsrc" />
    <add key="ServerHostName" value="DSRCV005\SQLDEV" />
    <add key="MasterConnString" value="Data Source=DSRCV005\SQLDEV;Initial Catalog=master;uid=OnlinePortal1;password=dsrc" />
    <add key="DBName" value="OnlinePortal" />
    <add key="ClientSettingsProvider.ServiceUri" value="" />

推荐答案

请确保您的代码选择了正确的web.config,即您对其进行了更改的代码.
还要确保更改后此部署正确.
Make sure your code is picking up the right web.config, that is, the one you made changes to.
Also make sure that after changes this was deployed correctly.


这篇关于键在app.config中的运行时中不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆