本文介绍了在web.config文件保护(加密)密码(asp.net)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 <system.net>
  <mailSettings>
   <smtp from="email@domain.com" deliveryMethod="Network">
    <network clientDomain="www.domain.com" host="smtp.live.com" defaultCredentials="false" port="25" userName=" email@domain.com " password="password" enableSsl="true" />
   </smtp>
  </mailSettings>
 </system.net>

这是我需要加密密码的情况。我搜索,GOOGLE了很多在网络上,但我不能能再进行加密。

This is the case where I need encryption for my password. I searched and googled much on the web but I can’t be able to encrypt anymore.

谁能帮我在一个简单而安全的方式做到这一点。

Can anyone help me do this in a simple but secure way.

推荐答案

我写的关于我的博客的一篇文章:http://pvlerick.github.io/2009/03/encrypt-appconfig-section-using-powershell-as-a-post-build-event/

I wrote an article about that on my blog: http://pvlerick.github.io/2009/03/encrypt-appconfig-section-using-powershell-as-a-post-build-event/

我的想法是你想要的密码是在IDE清楚,但在输出文件夹中的web.config / app.config中加密。

My idea was that you want the password to be clear in the IDE, but encrypted in the output folder's web.config/app.config.

这篇关于在web.config文件保护(加密)密码(asp.net)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-24 12:43