在 web.config 中加密连接字符串 [英] Encrypting Connection String in web.config

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

问题描述

我们如何加密 web.config 文件中的连接字符串部分?

How can we encrypt the connection string section in web.config file?

推荐答案

Rahul,将字符串从 ASCII 转换为 base64 字符串不是加密,这是您的第一个链接所建议的.我们可以轻松地将 base64 转换为 ASCII.

Rahul, converting a string from ASCII to base64 string isn't an encryption, which is what your first link suggests. We can easily convert base64 to ASCII.

将 configsection.protectSection() 与 RSA 密钥一起使用是一种适当的加密,可用于 Web.config 文件的部分.

Using configsection.protectSection() with an RSA key is a proper encryption that is available for sections of the Web.config file.

检查此链接:http://www.beansoftware.com/ASP.NET-Tutorials/Encrypting-Connection-String.aspx

请注意,我们无法在信任级别设置为中等信任的共享托管环境中加密 Web.config 文件.

Please note, that we can not encrypt Web.config file in a shared hosting environment where Trust level is set to medium trust.

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

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