Hi,
We are trying to perform a login in Razor but get an error. The login is performed, but we always get the error. Does anyone have any idea on how to solve this? We are using 8.4.1.3
Code:
if(str_password == obj_dataSet.Tables[0].Rows[0]["AccessUserPassword"].ToString() || str_password == Dynamicweb.Base.pwEncrypt(obj_dataSet.Tables[0].Rows[0]["AccessUserPassword"].ToString()))
{
var security = new Dynamicweb.Security();
We tried both ways:
security.ExtranetLogin(str_username, str_password);
security.ExtranetLogin(str_username, str_password, true);
}
Error:
System.ArgumentNullException: Value cannot be null.
Parameter name: value
at System.Web.Caching.CacheEntry..ctor(String key, Object value, CacheDependency dependency, CacheItemRemovedCallback onRemovedHandler, DateTime utcAbsoluteExpiration, TimeSpan slidingExpiration, CacheItemPriority priority, Boolean isPublic)
at System.Web.Caching.CacheInternal.DoInsert(Boolean isPublic, String key, Object value, CacheDependency dependencies, DateTime utcAbsoluteExpiration, TimeSpan slidingExpiration, CacheItemPriority priority, CacheItemRemovedCallback onRemoveCallback, Boolean replace)
at Dynamicweb.eCommerce.Cart.Session.Add(String key, Object value)
at Dynamicweb.eCommerce.Common.Context.LoadUserContextCarts()
at Dynamicweb.Security.ExtranetLogin(String username, String password, Boolean onlyActive, Boolean impersonateUser, Int32 impersonateUserID)
at Dynamicweb.Security.ExtranetLogin(String username, String password, Boolean onlyActive)
at CompiledRazorTemplates.Dynamic.efccdaefeea.Execute()
at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context)
at RazorEngine.Razor.Parse[T](String razorTemplate, T model, String cacheName)
at Dynamicweb.Rendering.Template.Output()
Best Regards,
Nuno