保护您的 ID(在连接字符串中)和安全的最佳方法是什么?稍后取回吗?
我正在进行安装文件(网络安装)安装,在安装过程中我提供了用户名和名称。密码(用于模拟)。但我的问题是我想使用这个用户&也在项目的另一个地方通过。所以,我说了为什么我不将这个 id 保存在连接字符串中(在 webconfig 中)&当我需要时稍后(设置完成后)检索...
但我的问题就在这里,我想加密用户&通过(当我将其保存在 webconfig 中时)&当我想检索它时,我需要解密它,以便我可以在以后的模拟中使用它。
那么,我该怎么做?你还有其他想法吗?
我想要的很简单,我需要在 websetup 安装过程中将我的 ID 存储在安全的地方,&稍后检索它而不暴露它..
非常感谢
I'm working in a setup file(web setup) installation, and during the installation I provide the username & the password(for impersonating). but my question is that I want to use this user & pass also in another place in the project. So, I said why I don't save this id in a connection string(in the webconfig) & retrieve later(when the setup finished) when I need it...
but my problem is here, I want to encrypt the user & pass (when I'm saving it in webconfig) & when I want to retrieve it I need to decrypt it So that I can use it in the impersonating later..
So, how can I do that ?? Do you have another idea to do it ??
What I want it is simply, I need to store my Id in a secure place during websetup installation, & retrieve it later without exposing it..
thanks alot
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
修改您的设置以配置一次应用程序池的标识。然后您就不必存储用户/密码,因为您可以使用进程的身份。
如果您仍然想存储该值(我强烈建议您这样做),您可以加密 web.Config 文件的某些部分。
此博客条目显示了一个示例: http: //odetocode.com/blogs/scott/archive/2006/01/08/encrypting-custom-configuration-sections.aspx
Modify your setup to configure an application pool's identity once. Then you won't have to store the user/password, as you can use the identity of the process.
If you still want to store the value (I highly discourage you to do that), you can encrypt some sections of the web.Config file.
This blog entry show an example : http://odetocode.com/blogs/scott/archive/2006/01/08/encrypting-custom-configuration-sections.aspx