public virtual Customer GetAuthenticatedCustomer()
{
if (_cachedCustomer != null)
return _cachedCustomer;
if (_httpContext == null ||
_httpContext.Request == null ||
!_httpContext.Request.IsAuthenticated ||
!(_httpContext.User.Identity is FormsIdentity))
{
return null;
}
var formsIdentity = (FormsIdentity)_httpContext.User.Identity;
var customer = GetAuthenticatedCustomerFromTicket(formsIdentity.Ticket);
if (customer != null && customer.Active && !customer.Deleted && customer.IsRegistered())
_cachedCustomer = customer;
return _cachedCustomer;
}
getting null _httpContext.User.Identity is FormsIdentity.
Please help me... it's very very urgent.