Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Next Newbie Web Service Question
Message
General information
Forum:
ASP.NET
Category:
Web Services
Title:
Next Newbie Web Service Question
Miscellaneous
Thread ID:
01242514
Message ID:
01242514
Views:
58
I created a WS with a Login method. The WS has a _bLoggedIn property that is set to True
if the login is successful.

I also have an IsLoggedIn method that returns _bLoggedIn, which for some reason is always False.

Anyeone wanna set me straight?



bool _bLoggedIn = false;


[WebMethod]
public bool Login(string sUserName, string sPassword)
{
int iCount = -1;
string sQuery = "select count(*) as reccnt from users where username = '" +
sUserName + "' and password = '" + sPassword + "'";

DataSet oDS = GetDataSet(sQuery);

try
{
iCount = System.Convert.ToInt32(oDS.Tables[0].Rows[0]["reccnt"]);
}
catch (Exception e)
{
}

_bLoggedIn = (iCount > 0); ;

return _bLoggedIn;
}

[WebMethod]
public bool IsLoggedIn()
{
return _bLoggedIn; This always returns False
}
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Next
Reply
Map
View

Click here to load this message in the networking platform