加密/解密web.config [英] Encrypt/Decrypt web.config

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

问题描述

发布到web服务器后,我需要加密web.config文件。问题是,如果我使用asp_reg,我将不会被其他机器/服务器读取。有谁有一个想法如何做到这一点?我的一些页面正在使用SQLDataSource读取web.config文件中的connectionstring。如果web.config加密,这个东西不行吗?



谢谢。

解决方案

SQLDataSource将工作。 Web.config的内容将在处理此文件时由ASP.NET自动解密。


I need to Encrypt the web.config file after publish it to the web server. The problem is, if I use asp_reg, I won't be read by the other machine/server. Does anyone have an idea how to do this? Some of my page is using SQLDataSource to read the connectionstring in the web.config file. Is this thing won't work if the web.config encrypted?

Thank you.

解决方案

SQLDataSource will work. Content of Web.config will be decrypted automatically by ASP.NET while processing this file.

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

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