Registration and Login issues

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
Sonoma
User
Posts: 17

Registration and Login issues

Post by Sonoma »

Good morning.

We are having 3 problems with the login page.

Problem 1.
After creating an account and recieve the email we recieve the following info and error in a box after clicking the activation link.
Blue i Your account is activated
Red X Activation failed

Problem 2.
After registration and on some logins the user(myself included) gets directed to a blank "default.vbhtml". I have attempted to type in the page manually but nothing happens.

Problem 3.
On occasion I get the "User is already logged in" screen even after I logged out and back in.

Only way I have found to get around problems 2 and 3 is to log in with a different user. This is inconvenient for our users. What would you suggest?

We are using version 10.1.0.
We are using MSSQL 2005.
We are on Windows Server 2008 and all clients are Windows 7.

Thank you.


Webmaster
User
Posts: 9427

Post by Webmaster »

  1. You may be logging in from a different browser or machine. Try modifying register.cshtml as follow.

// Auto login user from cookie values
if (ew_Request.Cookies[EW_PROJECT_NAME] != null) {

//***string sUsr = ew_Decrypt(ew_Cookie["username"]);
//***string sPwd = ew_Decrypt(ew_Cookie["password"]);

string sFilter = EW_USER_EMAIL_FILTER.Replace("%e", ew_AdjustSql(email)); // ***
string sUsr = ""; // ***
string sPwd = ""; // ***
string sSql = GetSQL(sFilter, ""); // ***
using (var rs = Conn.OpenDataReader(sSql)) { // ***
	if (rs != null && rs.Read()) { // ***
		sUsr = rsuser["<UserName>"]; // ***
		sPwd = rsuser["<Password>"]; // ***
	} // ***
} // ***

if (Security.ValidateUser(sUsr, sPwd, true))
	Page_Terminate(Convert.ToString(GetCustomValue("RegisterReturnPage"))); // Go to return page

}

  1. If you have enabled user level security, make sure that the user is at least assigned the default user level (i.e. 0).

  2. You may have logged in in another browser / machine and forgot to log out. In that case, you need to wait for the timeout period.


hk_agserna
User
Posts: 13

Post by hk_agserna »

There are some little changes in order to get it working...

// Auto login user from cookie values
if (ew_Request.Cookies[EW_PROJECT_NAME] != null) {

//string sUsr = ew_Decrypt(ew_Cookie["username"]);
//
string sPwd = ew_Decrypt(ew_Cookie["password"]);

string sFilter = EW_USER_EMAIL_FILTER.Replace("%e", ew_AdjustSql(email)); //Change email to: sEmail
string sUsr = ""; // ***
string sPwd = ""; // ***
string sSql = GetSQL(sFilter, ""); // ***
using (var rs = Conn.OpenDataReader(sSql)) { // ***
if (rs != null && rs.Read()) { // ***
sUsr = rs["<UserName>"].ToString(); //change rsuser to rs and add .ToString()
sPwd = rs["<Password>"].ToString(); // change rsuser to rs and add .ToString()
} // ***
} // ***

if (Security.ValidateUser(sUsr, sPwd, true))
Page_Terminate(Convert.ToString(GetCustomValue("RegisterReturnPage")));
// Go to return page
}


Post Reply