开发者

custom configuration provider is not loaded with exception

开发者 https://www.devze.com 2023-03-16 23:39 出处:网络
I am using the custom configuration provider as mentioned at the link. My app config looks like: <configuration>

I am using the custom configuration provider as mentioned at the link.

My app config looks like:

<configuration>
    <configSections>    
        <section name="log4net" type="ClassLibrary2.Class1,ClassLibrary2"/>
    </configSections>
    <log4net configProtectionProvider="XMLConfigProvider.XMLConfigProvider,XMLConfigProvider">
    <EncryptedData>
      开发者_Go百科  <sectionInfo name ="log4net"></sectionInfo>
    </EncryptedData>
</configuration>

I have placed the dll XMLConfigProvider in the calling application as well as gac. Still i am getting error:

An error occurred loading a configuration file: The protection provider was not found.


It's not as simple as this typo, is it?

"XMLConfigProvider.XMLCpnfigProvider"

Edit: Nope

OK, looking here: http://msdn.microsoft.com/en-us/library/ms254494.aspx

The value of the configProtectionProvider attribute seems to refer to the name in the section and is the type name of the provider itself.


Maybe

XMLConfigProvider

instead of

XMLCpnfigProvider
0

精彩评论

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

关注公众号