Developer forum

Forum » Development » ascx page to handle DW Login

ascx page to handle DW Login


Reply

I'm trying to get my ascx page / control to login an user. But i cant seem to get it working.

 

            if(!string.IsNullOrEmpty(HttpContext.Current.Request.QueryString["CartLogin"]))
            {
                string Username = Request.Form["loginUsername"];
                string password = Request.Form["loginPassword"];
                Dynamicweb.Login login = new Dynamicweb.Login(Username, password);
                login.NormalLogin();
            }


Can anyone point me in the direction of where i can find the right login to use in the API? 

 

 

{

 

 


Replies

 
Reply

You're using Login.NormaLogin which is for admin access, however, the cartlogin parameter your matching leads me to beleive you want to log on to frontend? You do this by using the Dynamicweb.Security class.

 

Please check out this article. It explains how to login using the API in both frontend and backend

 

http://developer.dynamicweb.dk/default.aspx?id=16918&action=ShowArticle&ArticleID=141

 

 
Reply
Sorensen wrote:

You're using Login.NormaLogin which is for admin access, however, the cartlogin parameter your matching leads me to beleive you want to log on to frontend? You do this by using the Dynamicweb.Security class.

 

Please check out this article. It explains how to login using the API in both frontend and backend

 

http://developer.dynamicweb.dk/default.aspx?id=16918&action=ShowArticle&ArticleID=141

 


 

Thats orrect, thanks lars , exactly what i was looking for.

 
Reply

I'm glad to hear so:)

 

You must be logged in to post in the forum