In the external web application there is a page Shopredirect.aspx, which calls a customized Login Page of the Nop admin content, to send the credentials for the login. At the NopCommerce side i get this values (Email, Password) and call the
if (Membership.ValidateUser(username, password))
Response.Redirect("SecurePage.aspx");
So the validation completes, but i come always to the Login.aspx page because there is no NopContext set for the user(Admin). What must i do to get access from the external application, for NopCommerce to navigate through the admin content?
When i debug the BaseNopAdministrationPage.cs in the following function the User Context is not set and it is null:
protected virtual bool ValidateAdministratorSecurity()
{
if (NopContext.Current == null ||
NopContext.Current.User == null ||
NopContext.Current.User.IsGuest)
return false;
return NopContext.Current.User.IsAdmin;
}
When is the current.user context set?