[C#]关于DLL使用.exe.config 的问题,也许以下描述有一点帮助
2008-01-03 17:42
423 查看
http://www.gotdotnet.com/Community/UserSamples/Download.aspx?SampleGuid=F184E04A-37BE-48D4-91AD-6EEC7552FD40
有时间看看这个gotdotnet的示例,不过它归根结底还是EXE自己读取自己的config,和我说得问题不一样,我的问题是DLL如何读取.exe.config。
As I understand, you want to use custom configuration
data in a DLL assembly which will be used other than ASP .NET application.
Please correct me if there is any misunderstanding. I'd like to share the
following information with you:
1. You can create a .config file for your component with your custom
configuration data in the folder where the executable file (which load the
DLL) resides. Please refer to the following KB article for detailed
information:
HOW TO: Use Custom Configuration Data in a Visual Basic .NET Component
http://support.microsoft.com/?id=321585
2. If you want to create a section handler of you own, you need to extends
the interface IConfigurationSectionHandler. I believe the following article
and sample are helpful:
IConfigurationSectionHandler Interface
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfSystemConfigurationIConfigurationSectionHandlerClassTopic.asp
GotDotNet User Sample: Alternative Config file section readers
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=f184e
04a-37be-48d4-91ad-6eec7552fd40
Please feel free to let me know if you have any problems or concerns.
Regards,
HuangTM
Microsoft Online Partner Support
MCSE/MCSD
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=59248
有时间看看这个gotdotnet的示例,不过它归根结底还是EXE自己读取自己的config,和我说得问题不一样,我的问题是DLL如何读取.exe.config。
As I understand, you want to use custom configuration
data in a DLL assembly which will be used other than ASP .NET application.
Please correct me if there is any misunderstanding. I'd like to share the
following information with you:
1. You can create a .config file for your component with your custom
configuration data in the folder where the executable file (which load the
DLL) resides. Please refer to the following KB article for detailed
information:
HOW TO: Use Custom Configuration Data in a Visual Basic .NET Component
http://support.microsoft.com/?id=321585
2. If you want to create a section handler of you own, you need to extends
the interface IConfigurationSectionHandler. I believe the following article
and sample are helpful:
IConfigurationSectionHandler Interface
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfSystemConfigurationIConfigurationSectionHandlerClassTopic.asp
GotDotNet User Sample: Alternative Config file section readers
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=f184e
04a-37be-48d4-91ad-6eec7552fd40
Please feel free to let me know if you have any problems or concerns.
Regards,
HuangTM
Microsoft Online Partner Support
MCSE/MCSD
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=59248
相关文章推荐
- [C#]关于DLL使用.exe.config 的问题,也许以下描述有一点帮助
- [C#]关于DLL使用.exe.config 的问题,也许以下描述有一点帮助
- [C#]关于DLL使用.exe.config 的问题,也许以下描述有一点帮助
- [C#]关于DLL使用.exe.config 的问题,也许以下描述有一点帮助
- [C#]关于DLL使用.exe.config 的问题,也许以下描述有一点帮助
- 好长时间上不了博客,我还以为因为我发表抗日言论账户被删了,编程中好多新经验新发现不能拿出来和朋友们分享,那个急呀。以下是我在工作中积累的一些经验和解决的一些问题,希望能对大家有一点帮助。
- 关于C#更新Access数据库时发现的一个没有任何技术含量的问题,给大家分享,希望能给大家帮助
- C#中,关于除法“/”运算得一点问题。
- 关于c#里面DataGridView的一点问题
- 关于win10 64 位,C#无法 使用软键盘的问题解决方案
- 关于delphi Com+调用C# DLL的一点说明
- 关于SQL Server中的DateTime类型和C#中的DateTime类型的一点小记录
- 关于系统首页绘制问题(ext布局+c#后台加入数据)经html输出流输出响应client
- 关于C#中用WMI获取系统信息问题
- 关于Ember.js中的route的一点问题
- 关于C#中Thread.Join()的一点理解
- 关于.net(C#)中的跨进程访问的问题
- 关于C#中货币类型和数值类型、字符串类型的转化和在DataGridView中的显示问题:
- 关于数据库取数据并显示到html:select的很难描述的问题
- C#调用C++写的dll 函数传递参数问题,请有经验的人详细描述