需要在web.config中加密连接字符串和stmp信息 [英] Need Encrypted connection string and stmp information in the web.config

查看:116
本文介绍了需要在web.config中加密连接字符串和stmp信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我可以将加密的连接字符串和stmp信息保存在web.config中。需要解密并使用?





我可以加密连接字符串的点/事件是什么和SMTP并保存在web.config中? (如果在web.config中发生更改,那么现有会话是否已过期?)



什么是最佳解决方案?



谢谢

解决方案

很容易与 aspnet_regiis.exe - 查看pe / pd / pef和pdf选项。您还可以以编程方式执行此操作。它可以通过加密特定的配置部分来实现。在你的情况下,这是 connectionStrings smtp 部分。



您可以使用 DPAPI RSA ,您可以在机器范围或特定用户帐户上进行加密。 p>

I want to keep encrypted connection string and stmp information in the web.config.

can I store Connection String and SMTP information in web.config encrypted and where I need just decrypted and use?

OR

What is the point/event where i can encrypt the Connection String and SMTP and save in the web.config? (and if the changes happen in web.config in that, is existing session expired?)

What is the best solution?

Thanks

解决方案

It's easy to do with aspnet_regiis.exe- look at the pe/pd/pef and pdf options. You can also do it programmatically. It works by encrypting a specific configuration section. In your case that is the connectionStrings and smtp sections.

You can use either DPAPI or RSA and you can encrypt on either a machine wide basis or on a specific user account.

这篇关于需要在web.config中加密连接字符串和stmp信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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