Search code examples
asp.netiis-632bit-64bitnopcommercewindows-server-2003-r2

NopContext.Current.User is always null


Note: also posted on the nopCommerce forum.


I've been developing an application based on nopCommerce 1.60. I'm developing on Windows 7 Pro 64bit.

I'm deploying the application to Windows server 2003 R2 (32bit) for staging and this works fine. It works perfectly and exactly like when I run it on the Visual Studio dev server.

I've just deployed the code to the live server for testing in that environment and I've got a real show stopper. NopContext.Current.User is always null!

The live server is Windows 2003 R2 64bit, and this is the only difference I can see. I've been through every page of the site settings in IIS on both servers and made sure every setting is the same, I've also done the same for the Application Pool.

I don't know what else I could try.

Any suggestions?


Solution

  • The issue was that the anonymousIdentification section was missing from the web.config.

    The fix was simply to add the following to the system.web section

     <anonymousIdentification
          enabled="true" />