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

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

问题描述

我要保持在web.config中加密的连接字符串和STMP信息。

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

我可以存储在web.config中的连接字符串和SMTP信息加密,并在那里我只需要解密和使用?

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

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

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?

感谢

推荐答案

这是容易做到的 ASPNET_REGIIS.EXE - 看PE / PD / PEF和PDF选项。你也可以做到这一点<一个href=\"http://msdn.microsoft.com/en-us/library/system.configuration.sectioninformation.protectsection.aspx\"相对=nofollow>编程的。它的工作原理是加密的具体结构图。你的情况是这样的是connectionStrings SMTP 部分。

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.

您可以使用 DPAPI 或的 RSA 并可以在任一台机器范围的基础上或特定的用户帐户加密

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天全站免登陆