Login passes normally but customer is not logged in when back on home page

Posted: May 04, 2016 at 5:49 PM Quote #167054
For some reasons, we have had to move our store on the web server (physically on the server and also in the logical structure inside IIS ... for having it on the 443 port). Since then it has remain impossible to login to the newly located site.

What happen is that the login passes ok: for example if the password is wrong, the login view show an error indicating the password in not correct, otherwise, when entering valid credentials everything goes fine (I have follow the code in CustomerController.Login() and watch roughly the content of variables and the code flows normally with apparent correct variable content until return RedirectToRoute("HomePage") in the CustomerLoginResults.Successful case.

Once back on the store home page (without any error message), there is no user logged in (the login hyperlink still appears instead of the user's identity/email in the top navigation menu).

How can that be and more important how can this condition be fixed?

Also, where is the code for the top navigation menu, I have been browsing the Views/Shared folder content but didn't find what I expected.

Thank you in advance for helping
Jean-Marc Gingras
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: May 05, 2016 at 3:12 AM Quote #167067
Try to generate machine key. Read more here: http://www.codeproject.com/Articles/16645/ASP-NET-machineKey-Generator
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Best Regards,
Mariann
Posted: May 05, 2016 at 10:13 AM Quote #167098
Thank you for the answer.

Yes I already did something quite similar, the site has been moved alongside other ASP.Net MVC applications of ours and those all share same Machine Keys because some class of users can navigate from one to the other. They all use Form authentication with MS Entity.

So just to avoid confusion: before moving, Machine Keys for the nopCommerce where configured with AutoGenerate,IsolateApps. After moving I changed them to specific keys, those same used by our other applications.

I will try to generate new keys and let you know the result.

Best regards
Jean-Marc Gingras
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: May 05, 2016 at 10:22 AM Quote #167099
I changed the Machine Keys for new ones and the behavior is still the same.

Would you know where to look for the code that display the top navigation menu (showing Login or User Id & Logout)? I thought I could drill down from this code and it could lead me find what/where something is wrong/missing.

Thank you for your help.

Best regards
Jean-Marc Gingras
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: May 05, 2016 at 12:23 PM Quote #167112
[email protected] wrote:
I changed the Machine Keys for new ones and the behavior is still the same.

Would you know where to look for the code that display the top navigation menu (showing Login or User Id & Logout)? I thought I could drill down from this code and it could lead me find what/where something is wrong/missing.

Thank you for your help.

Best regards
Jean-Marc Gingras


This menu is here: Views\Common\HeaderLinks.cshtml
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Best Regards,
Mariann
Posted: May 13, 2016 at 7:09 AM Quote #167586
After some tests I appears that login doesn't find the customer. The lookup happens in the CustomerService.GetCustomerBy... function which uses the _customerRepository member of the same class.

It is not clear for me where this repository comes from at instance creation (possibly the result of some dependency injection component). I know for sure that the store itself is connected with the right instance of database because categories and products are correct so there might be some specific connection for authentication database.

Does this make sense? If so, where/how would this connection be specified in configuration, how can I find more about it?

Thank you for helping
Best regards
Jean-Marc Gingras
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: July 17, 2017 at 4:28 PM Quote #190169
Was a solution found for this?  We have seen a similar issue on self hosted web servers and to fix one as a test we redeployed the server and had no issues, everything worked.

Please let me know.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Premium support services
  • Dedicated premium support services provided by core developers are intended for persons who run mission critical websites, work on projects with tight deadlines, or want to get dedicated support.
Professional services
  • Want to open a new store? Want to take your store to the next level? Need a custom extension? We can customize nopCommerce to fit your store perfectly. Request a quote to get started.
eCommerce CONFERENCE 2017
Learn more