Note: Actually I am using DNN 4+ and by mistake I have put in ASP.NET1.1. So here it is now.
I like to know two things:
Question1.
I am trying to write a function which will return a direct login url, I mean by using this link user will be able to login to DNN site, they do not have to type login information. User name and password will be hardcode with the url.
So to achive this I am creating one webpage, for example AnotherLogin.aspx and URL will be something like, http://www.test.com/AnotherLogin.aspx?username=test&password=password. Now when user will click the link then into the page_load I am collecting login details., eg., username and password and calling DoLogin method
private void DoLogin(string username, string password) {
// Use DNN API to authenticate user
.................. NEED HELP HERE ............................
// if ok then forward to http://www.test.com
// or forward to http://www.test.com/LoginError.aspx
}
Can anybody tell me how can I do this? Is there any method/s I can call, which will not only authenticate user, but also will behave same as normal DNN login (when user manually providing login details and clicking login button).
Question2:
I have an existing system which has nearly 700 users and their password encrypted by MD5. I am trying to transfer those user to DNN membership without changing their password, so that user can use same password for DNN site. I have already writen a test method which is registering user automatically (not using the webform, automatic process, like loop though the record and add DNN user).
So now I just like to know what is the way to tell DNN, when I am calling UserController method to add user to DNN membership then not to encrypt the value what I am passing as a password? And using MD5 during direct login (see my question1)?
Thanks for any reply.