大佬教程收集整理的这篇文章主要介绍了asp.net – 如何在C#2.0中的Web.config中加密用户名和密码,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
<add key="userName" value="s752549"/> <add key="userpassword" value="Delhi@007"/>
现在我想要加密,以免身体看到它,这些密码也可能会频繁变化(15天).
<?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="secureAppSetTings" type="System.Configuration.NameValueSectionHandler,System,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089" /> </configSections> <appSetTings> <add key="Host" value="www.foo.com" /> <add key="Token" value="qwerqwre" /> <add key="AccountId" value="123" /> <add key="DepartmentId" value="456" /> <add key="SessionEmail" value="foo@foo.com" /> <add key="DefaultFolder" value="789" /> </appSetTings> <secureAppSetTings> <add key="userName" value="s752549"/> <add key="userpassword" value="Delhi@007"/> </secureAppSetTings> </configuration>
然后使用aspnet_regiis
For Ex: aspnet_regiis -pef secureAppSetTings . -prov DataProtectionConfigurationProvider
以上是大佬教程为你收集整理的asp.net – 如何在C#2.0中的Web.config中加密用户名和密码全部内容,希望文章能够帮你解决asp.net – 如何在C#2.0中的Web.config中加密用户名和密码所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。