Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Which approach to use?
Message
 
To
20/03/2002 12:50:52
General information
Forum:
ASP.NET
Category:
Web Services
Miscellaneous
Thread ID:
00628713
Message ID:
00635099
Views:
15
When asp.net application starts, login form appears. When user attempts login his username and password are passed to a method on VFP web service which returns a true\false indicating sucess or failure. If true, username and password are stored to a session variable and used for each trip to web service.
// Try login
bool bRetval = true;
atsws myWS = new atsws();	
		
bRetval = myWS.Login(txtUsername.Value, txtPassword.Value);
if(bRetval == false)
{
  divMsg.InnerText = "Invalid Username or Password.  Try again or contact System Administrator for further assistance.";
}
else
{   
  // Store UserID in session variables
  Session["strUsername"] = txtUsername.Value;
  Session["strPassword"] = txtPassword.Value;
  Response.Redirect("main.aspx");
}
Charlie
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform