将加密的web.config从计算机复制到另一台 [英] Copy encrypted web.config from computer to another

查看:81
本文介绍了将加密的web.config从计算机复制到另一台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作可在本地网络上运行的asp.net应用程序我想加密web.config中的连接字符串

当我加密web.config文件时工作正常

但是当我将它复制到服务器时它不起作用



请注意解密文件在两台机器上都能正常工作



我可以通过网络访问共享文件夹来安装更新,但我无法登录服务器



< b>我尝试了什么:



我使用以下命令加密

ASPNET_REGIIS -pefconnectionStringsD :\Articles\EncryptWebConfig

I'm making asp.net application that work on a local network I want to encrypt the connection string in web.config
when I encrypt the web.config file It worked fine
but when I've copied it to the server it doesn't work

note that the decrypted file works fine on both machines

I have access to a shared folder through network to install updates but I can't login to the server

What I have tried:

I use the following command to encrypt
ASPNET_REGIIS -pef "connectionStrings" "D:\Articles\EncryptWebConfig"

推荐答案

问题是用于加密配置文件的密钥是您的计算机本地的,其他计算机无法解密...

阅读本页(到最后)了解如何与其他网络服务器共享密钥...

演练:创建和导出RSA密钥容器 [ ^ ]
The problem is that the key used to encrypt your config file is local to your computer and the other computers can not decrypt it...
Read this page (to the end) to see how to share the key with other web servers...
Walkthrough: Creating and Exporting an RSA Key Container[^]


这篇关于将加密的web.config从计算机复制到另一台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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