我的應用程序使用ASP.NET會員供應商。經過正確的配置並在配置文件中指定了密碼格式後,用戶密碼仍然以純文本而不是散列值存儲。
我在做什麼錯?
這裏是我的webcongfigurationfile爲什麼ASP.NET會員供應商不加密我的密碼
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<connectionStrings>
<add name="db_connection" providerName="System.Data.SqlClient" connectionString="Data Source=192.168.11.10;Integrated Security=true;Initial Catalog=TestDB;User ID=sysad;[email protected]_ec"/>
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<pages>
<namespaces>
<add namespace="System.Web.Optimization" />
</namespaces>
<controls>
<add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" />
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
<add assembly="JuiceUI" namespace="Juice" tagPrefix="juice" />
</controls>
</pages>
<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="25" />
</authentication>
<membership defaultProvider="Myprovider">
<providers>
<add name="Myprovider"
type="System.Web.Security.SqlMembershipProvider"
passwordFormat="Hashed"
connectionStringName="db_connection"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
requiresUniqueEmail="false"
maxInvalidPasswordAttempts="3"
minRequiredPasswordLength="7"
minRequiredNonalphanumericCharacters="1"
passwordAttemptWindow="10"
applicationName="" />
</providers>
</membership>
</system.web>
</configuration>
@ shahkalpesh,我這樣做對我的Web配置文件 – kombo
我已經通過幾樣了網上,他們顯示出類似的一個礦山 – kombo
你用'SHA1'或'MD5'加上'HashAlgorithmType'到你的web配置? – shahkalpesh