由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
DotNet版 - 问appSettings
相关主题
又一个教你怎么做GALLERY的请问.Net相关的工作,面试是什么风格的?
C# listview中的动态查找vb.net event handler 请教!如何raise一个event,所有form中任何一个on top的可以handle?
Thread suspend and resume.exe.config 是只读的吗?
a C# question.net 2003竟然不支持类中静态变量
Q: Radiobuttonlist - select item in Datalistabout preventing history back in ASP.NET
Look for a reliable ajax framework关于AppSettings Object in ASP .Net
为什么我的vs2005不能打开Access文件Property.Settings问题
想破脑壳也不知道为什么finally不执行菜鸟再问个web.config问题
相关话题的讨论汇总
话题: handlers话题: section话题: 2229833话题: net
进入DotNet版参与讨论
1 (共1页)
c**t
发帖数: 2744
1
In .Net 1.1-, there is a good example to write our own appSettings handler l
ike http://www.codeproject.com/dotnet/namevaluemultiple.asp?df=100&forumid=1
5760&select=2229833&msg=2229833. But in .Net 2.0+, it doesn't work any more.
Any solution?
c**e
发帖数: 2558
2
you can implement custom section handlers. start from here:
http://msdn2.microsoft.com/en-us/library/ms228062(VS.80).aspx
you don't need to be limited to using appSettings and can
define your own structure of configuration

l
more.

【在 c**t 的大作中提到】
: In .Net 1.1-, there is a good example to write our own appSettings handler l
: ike http://www.codeproject.com/dotnet/namevaluemultiple.asp?df=100&forumid=1
: 5760&select=2229833&msg=2229833. But in .Net 2.0+, it doesn't work any more.
: Any solution?

c**t
发帖数: 2744
3
Having a project using appSettings like the link I had given; I tried MSDN
suggestion, it doesn't allow the customized section name like appSettings.

【在 c**e 的大作中提到】
: you can implement custom section handlers. start from here:
: http://msdn2.microsoft.com/en-us/library/ms228062(VS.80).aspx
: you don't need to be limited to using appSettings and can
: define your own structure of configuration
:
: l
: more.

c**t
发帖数: 2744
4
It always claims "[System.Configuration.ConfigurationErrorsException] = {"
Configuration system failed to initialize"}"

【在 c**t 的大作中提到】
: Having a project using appSettings like the link I had given; I tried MSDN
: suggestion, it doesn't allow the customized section name like appSettings.

c**t
发帖数: 2744
5
Microsoft has removed the ability to remove section handlers, which means
that
we can NOT deregister the default appSettings handler and register a new one
. Microsoft reduced configurability flexibility by preventing the removal of
section handlers.

【在 c**t 的大作中提到】
: It always claims "[System.Configuration.ConfigurationErrorsException] = {"
: Configuration system failed to initialize"}"

c**e
发帖数: 2558
6
i guess that's because they introduced ConfigurationManager class
in 2.0 to ease working with appSettings and connectionStrings (thru
ConfigurationManager.AppSettings and ConfigurationManager.ConnectionStrings).
they probably don't want you to replace handlers for these sections
with your own.
for new code, i'd suggest (as in my previous post) to implement your own
section handlers, which gives you much more flexibility than appSettings,
etc
you can support whatever schemas you design in configu

【在 c**t 的大作中提到】
: Microsoft has removed the ability to remove section handlers, which means
: that
: we can NOT deregister the default appSettings handler and register a new one
: . Microsoft reduced configurability flexibility by preventing the removal of
: section handlers.

1 (共1页)
进入DotNet版参与讨论
相关主题
菜鸟再问个web.config问题Q: Radiobuttonlist - select item in Datalist
Ndoc - .Net's javadocLook for a reliable ajax framework
MSDN 上的PATTERN 资源为什么我的vs2005不能打开Access文件
[转载] 最近要用VC#.net编成,请教一下想破脑壳也不知道为什么finally不执行
又一个教你怎么做GALLERY的请问.Net相关的工作,面试是什么风格的?
C# listview中的动态查找vb.net event handler 请教!如何raise一个event,所有form中任何一个on top的可以handle?
Thread suspend and resume.exe.config 是只读的吗?
a C# question.net 2003竟然不支持类中静态变量
相关话题的讨论汇总
话题: handlers话题: section话题: 2229833话题: net