Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, November 22, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Web Forums - ASP/ASP.NET/Web Services/Other
Forum to discuss building external web applications for SalesLogix. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to ASP/ASP.NET/Web Services/Other | New ThreadView:  Search:  
 Author  Thread: encrypting webpassword through a custom page
Ismael Gonzalez
Posts: 56
 
encrypting webpassword through a custom pageYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Feb 08 1:09 PM
Hi guys,

In a custom Lead capture type page that I am making, I have a form with just basic contact info fields (email, password, verify password, first and last name)

What I want is for a person to fill in these fields and then have my page insert the record into the SLX DB as a contact (account is just filled in with the last, firstname, for the account name) and grant the new Contact, web access permissions.

I can insert the data into the DB with no problems, but I'm having some trouble with the password encryption and being able to log in as a new contact.

for my contact creation i use this:

IContact con = Sage.Platform.EntityFactory.Create();
...
con.WebUserName = mytxtEmail;
con.WebPassword = SLXEncryption.Encrypt(mytxtPassword);
con.SaveWebAccess(true, mytxtPassword, mytxtVerifyPassword);
con.Save();

Then I execute this query:

SQL = "INSERT INTO SLXWebUserInfo (USERID, CREATEDATE, CREATEUSER, USERPREFERENCES) VALUES " +
"('"+con.Id.ToString()+"','"+DateTime.Now+"','ADMIN','CONTEXT:webticketcust=y|')";

So apparently I have all the pieces needed for logging into the Customer Portal, but when I try to log in, I get this error message:

The password you have entered is not valid. Please try again or request assistance.

Is my encryption method incorrect? how should I approach this? or how can I fix this?

thanks,
[Reply][Quote]
Ismael Gonzalez
Posts: 56
 
Re: encrypting webpassword through a custom pageYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Mar 08 6:24 PM
the problem was that i was trying to insert a "@" in the webusername field, so i had to do some extra coding just adding in the firstname to the webusername field, then updating that same record to leave the contents of mytxtEmail field in the webusername field, the encrypting of the password also worked after doing this.
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/22/2024 10:42:33 AM