Developer forum

Forum » Development » Error on LogOnHandler

Error on LogOnHandler

Shiwanka Chathuranga Dynamicweb Employee
Shiwanka Chathuranga
Reply

Error on LogOnHandler

Dynamicweb.Frontend.LogOnHandler logOnHandler = new Dynamicweb.Frontend.LogOnHandler(1);
logOnHandler.LogOn("username", "password");

Error generate from notification subscriber, this is version 9.9.3

   at Dynamicweb.Ecommerce.Cart.Notifications.BeforeLoginSubscriber.OnNotify(String notification, NotificationArgs args)
   at Dynamicweb.Extensibility.Notifications.NotificationManager.Notify(String notification, NotificationArgs eventArgs)
   at Dynamicweb.Frontend.LogOnHandler.LogOn(String username, String password, Boolean onlyActive, Boolean impersonateUser, Int32 impersonateUserId, Boolean skipPasswordCheck)
   at Dynamicweb.Frontend.LogOnHandler.LogOn(String username, String password)

 

is it a DW bug or anything missing?

 


Replies

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

Hi Shiwanka,

  1. What is the error message?
  2. Where is the LogOn method being called from? Please provide a full stack trace, if possible.

Best regards,
Morten

 
Shiwanka Chathuranga Dynamicweb Employee
Shiwanka Chathuranga
Reply

object Reference error

seems where i use this has no access to  "Context.Current.Session", i check and update you

 
Shiwanka Chathuranga Dynamicweb Employee
Shiwanka Chathuranga
Reply

This function is working and i have called from a place that does not have access to current.session

Thanks @Morten for message

 

You must be logged in to post in the forum