Last post Jul 08, 2008 09:10 AM by XiaoYong Dai – MSFT
Jul 06, 2008 04:23 PM|Joeri Pansaerts|LINK
I've got some troubles with the password format. On my localhost the login works perfect, but when I upload my files to the webserver the login doesn't work anymore. After a long search, I've founded that when I set in my database, in the table aspnet_membership,
the PasswordFormat to zero and I type my password without any format in my database, the login works perfect.
so now my question, how can I set my passwordFormat to 1 in my database, so it works on my localhost and on the webserver ?
here my web.config :
<remove name="AspNetSqlMembershipProvider" />
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=188.8.131.52, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Jul 06, 2008 04:39 PM|guru_sarkar|LINK
these are three setting 0=Clear, 1=Hashed and 2=Encrypted ..
since your web.config has passwordFormat = Hashed .. it is already 1.
Jul 06, 2008 04:45 PM|Joeri Pansaerts|LINK
Is it possible the server override these settings ? Because in my web.config it is Hashed ... so I don't know what the problem can be
Jul 06, 2008 04:59 PM|guru_sarkar|LINK
actually machine.config has default membership settings on your machine ... but is also has passwordformat = hashed by default ...
also looking at your web.config ..it seems you have already taken care of overrriding the machine.config default settings ..
so i doubt it might not be a passwordformat issue ...
i would suggest you to create a brand new user on the server..keeping the pwdformat hashed .. and try login-in..
Jul 06, 2008 06:05 PM|Joeri Pansaerts|LINK
I've tried, but with no succes.
On my server I login with SSL. Maybe could that be the problem ?
EDIT : I've tried without SSL, also no succes :(
Jul 06, 2008 06:17 PM|Joeri Pansaerts|LINK
Ok, I've written a small script :
protected void Page_Load(object sender, EventArgs e)
On my localhost, that's the response :
SHA1 <form id=form1 name=form1 action=Test.aspx method=post>
On my Server :
MD5 </form> <form id=form1 name=form1 action=Test.aspx method=post>
</form> <form id=form1 name=form1 action=Test.aspx method=post>
Jul 06, 2008 06:40 PM|guru_sarkar|LINK
not sure ....but try setting the HashAlgorithmType attribute of membership element .
do you have machinekey element explicitly set on your server ..??
membership take this algorithmtype from machinekey element ...
Jul 08, 2008 09:10 AM|XiaoYong Dai – MSFT|LINK
As guru_sarkar said, you can set the AlgorithmType in web.config like this
userIsOnlineTimeWindow="number of minutes"