为多个服务器加密 web.config 数据
我需要为客户端加密 web.config 文件的部分内容。我见过的大多数参考文献都是使用 aspnet_regiis 进行加密。但是,据我所知,这需要在托管该站点的 Web 服务器上进行,这意味着每个服务器的加密值都不同。我无权访问该客户端的服务器。我发现了一个关于以可跨服务器移植的方式加密 web.config 数据的可能性的参考,但尚未找到任何更详细的信息。有谁知道该怎么做?
I need to encrypt sections of my web.config file for a client. Most of the references I've seen are to using aspnet_regiis to do the encryption. However, as far as I can see, this needs to happen on the web server which will host the site, which means the encrypted values will be different for each server. I don't have access to this client's servers. I found a passing reference to the possibility of encryping the web.config data in a way that is portable across servers, but haven't found any more detailed information. Does anyone know how to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要使用 RSA 对其进行加密,因为使用 RSAProtectedConfigurationProvider 您可以复制您的跨服务器密钥。
因此,向下滚动到上述链接的“Web Farm Scenarios”部分并按照步骤操作。
you need to encrypt it using RSA because with the RSAProtectedConfigurationProvider you could copy your key across server.
So, scrool down to the "Web Farm Scenarios" section of the above link and follow the steps.