VS 2010中的ConfigEncryptionProvider和3.5目标框架 [英] ConfigEncryptionProvider and 3.5 target framework in VS 2010

查看:59
本文介绍了VS 2010中的ConfigEncryptionProvider和3.5目标框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

使用exe输出(不确定网络)构建任何项目时,以4.0以上版本的框架(例如3.5)为目标,定义ConfigEncryptionProvider可以使用vs 2010对app.config文件进行加密,则会添加一些配置标签到 输出配置文件,而3.5框架无法识别它们,因此,配置例外会在运行时抛出.

作为新配置标签的示例:

< uri configProtectionProvider = '" " < ; EncryptedData > YYYYYYYYYY </ > uri And:

< />

< 跟踪 解决方案

能否给我们一份最终的app.config文件的副本?

您真的是说任何"吗? EXE文件?它可以是简单的"Hello World"吗?应用类型?还是需要工作流应用程序或WCF应用程序?

 

Jim


Hello,

When building any project with exe output (not sure about the web) targeting a framework older than 4.0 (3.5 as an example) with ConfigEncryptionProvider defined to encrypt the app.config file using vs 2010, some configuration tags are added to the output config file where they are not recognized by 3.5 framework, hence to that, configuration exception(s) will be thrown at run-time.

As an example of new configuration tag:

<uri configProtectionProvider="XXXXXX"> <EncryptedData>YYYYYYYYYY</EncryptedData>  

 

 

 

</uri>

 

And:

<routing />

<tracking />

.

.

.

 

I'm not sure if tags are added to the configuration when there is no ConfigEncryptionProvider defined as i didnt test it.

Switching the target framework to 4.0 will solve the problem. but is there any workaround to stop adding those tags and generate the config file same way vs.net 2008 does?

Thanks

解决方案

Can you give us a copy of the resulting app.config file?

Do you really mean "any" exe? Can it be a simple "Hello World" type of application? Or does it need to be a workflow application or a WCF application?

 

Jim


这篇关于VS 2010中的ConfigEncryptionProvider和3.5目标框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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