Register  Login
Forums
 
Can't Login after successfull installation
Last Post 07-15-2010 08:57 PM by admin. 11 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
rogercarvalho
New Member
New Member
Posts:8

--
07-14-2010 03:48 PM  
Hello,

I installed the Standard aspnet Version, created the admin account and logging to the site the firts time. everything is ok.

But after logout, if i try to login again to the site it says that the password is not correct!!

I have shure that password is correct.
I checked the database users Table and the user "admin" is there.

thanks!
Roger

admin
Basic Member
Basic Member
Posts:267

--
07-14-2010 03:56 PM  
You can create a new account, and then go into the database, and in the ADefHelpDesk_User table, set IsSuperUser to true for that account.
rogercarvalho
New Member
New Member
Posts:8

--
07-14-2010 04:54 PM  
Hi,
I created a new account, and in the ADefHelpDesk_User table, I set IsSuperUser to true for that account, but it stills not working.

thanks
admin
Basic Member
Basic Member
Posts:267

--
07-14-2010 05:48 PM  
1) Are you able to create any new users and log in using their account?
2) Do you have the "Verified Registration" turned on (turn it off for testing if it is)
3) Are you creating new users using the normal method when you have "Allow User Registration" turned on, or are you putting the user directly in the database? You can't put them directly in the database because the passwords are hashed.
admin
Basic Member
Basic Member
Posts:267

--
07-14-2010 06:22 PM  
Also look in the Event Viewer on your server to see if an error is being thrown.

I know you had modified the code previously, ensure that the database tables have not been altered, for example, the password hash will not work correctly if the database field was altered.
rogercarvalho
New Member
New Member
Posts:8

--
07-14-2010 09:17 PM  
1) Are you able to create any new users and log in using their account?
No, i am able to create new users, but i cant login.

2) Do you have the "Verified Registration" turned on (turn it off for testing if it is)
Yes, i have it OFF .

3) Are you creating new users using the normal method when you have "Allow User
Registration" turned on, or are you putting the user directly in the database? You can't put them directly in the database because the passwords are hashed.

I am creating new users using normal method with the Registration Link.

And i remove the database and try again but nothing.

thanks a lot
rogercarvalho
New Member
New Member
Posts:8

--
07-14-2010 09:24 PM  
I do not altered the database tables, i try other copies that i am not open in visual studio. I used the files intact i have download at your site.
i will try to see the event viewer...

thanks again
roger
admin
Basic Member
Basic Member
Posts:267

--
07-14-2010 10:03 PM  
Unless you can find an error in your event viewer on the server I am at a total loss. This has been tested and used with no problems.

When you log into the site, the file "Login.aspx.cs" is being called.

It calls this line of code that combines the username and the password and hashes it and compares it to what is saved in the database:

if (User.Password == Utility.HashPassword(User.Username.ToLower() + LoginControl.Password))

So the only possible place something could go wrong is in the method "Utility.HashPassword".

That method is very simple, it has one line:

HashedPassword = FormsAuthentication.HashPasswordForStoringInConfigFile(Password,
System.Web.Configuration.FormsAuthPasswordFormat.MD5.ToString());

That same method is called by "Register.aspx.cs". That is the file that is used to create the password when the user is first created:

objADefHelpDesk_User.Password = Utility.HashPassword(txtUserName.Text.Trim().ToLower() + txtPassword.Text.Trim());

So the only thing that I think could go wrong is that you have usernames or passwords with spaces or contain characters that are non-standard?

Also, ensure that you have not Localized ADefHelpDesk (translated it into another language) and have the username and password fields mis-labeled.
rogercarvalho
New Member
New Member
Posts:8

--
07-15-2010 11:12 AM  
I think the problem maybe here:

var result = from AUser in dnnHelpDeskDALDataContext.ADefHelpDesk_Users
where AUser.Username == LoginControl.UserName
select AUser;

ADefHelpDesk_User User = (ADefHelpDesk_User)result.FirstOrDefault();

if (User != null)


- the problem maybe in the select user from DAL...
- I think User is null, but i dont know why, because the code jumps to the next code:

string strFailureText = GetLocalResourceObject("FailureText.Text").ToString();
LoginControl.FailureText = strFailureText;
admin
Basic Member
Basic Member
Posts:267

--
07-15-2010 01:24 PM  
The username that you type in should be the value for:

"LoginControl.UserName"

If you are able to run this in Debug mode, you can hover your mouse over "UserName" and see what name it is trying to retrieve.

That name should be in the "ADefHelpDesk_Users table" in the "Username" field.
rogercarvalho
New Member
New Member
Posts:8

--
07-15-2010 07:59 PM  
It retrieves an empty string like this "" so his value is null instead of "admin".

I cant figure out more than this...

I dont know where is the problem...

but the user is in the ADefHelpDesk_Users table
and i am able to create new users by the normal method.

admin
Basic Member
Basic Member
Posts:267

--
07-15-2010 08:57 PM  
Do you have AdefHelpDesk translated into another language? If so you could have the fields mis-labeled and you are typing the username into the password field and the password into the username field.

Otherwise the code must have been altered because no one would ever be able to use ADefHelpDesk if they could not log in
You are not authorized to post a reply.


Powered by Active Forums
Terms Of Use | Privacy Statement | Copyright 2009 by Michael Washington Dynnamite DotNetNuke Skins & Modules