2

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?

skaffman
  • 398,947
  • 96
  • 818
  • 769
Greg B
  • 14,597
  • 18
  • 87
  • 141

2 Answers2

4

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" />
Greg B
  • 14,597
  • 18
  • 87
  • 141
  • Too bad, this doesn't work with my installation. It's still always null. – Olaf Jun 24 '11 at 10:33
  • @Olaf. Are you compiling the site? Do you have the global.asax and all the code that comes in it? Are your App_Start and BeginRequest methods getting hit? – Greg B Jun 24 '11 at 10:41
  • You have been right! The site hasn't been compiling properly, the Root.Master.cs code-behind hasn't been running, but a simple operator in the front-end worked very well. Thanks very much, esp. for caring for someone who "re-opened" the question half a year later! – Olaf Jun 24 '11 at 13:00
  • @GregB how did you solve working with enginecontext.current.resolve in order to create the instance of the object, or did you work with autofac-etc in the same way nop works and customize other areas..? brgds – s_h Dec 29 '11 at 20:43
  • @sebastian_h I didn't run into any issues with it. Do you have a specific question that might be better asked on it's own? – Greg B Dec 30 '11 at 21:29
  • @GregB yes probably I´ll proceed with a question. I like that project as repository, on the other hand I want to use nopcontext approach but not Inversion of control Ioc.Resolve... and I found it very difficult to split it. brgds! – s_h Dec 31 '11 at 18:02
-1

Download nopCommerce 1.80. It's fixed there

Andrei M
  • 3,429
  • 4
  • 28
  • 35
  • How do you know that? Can you explain the issue? What is the fix? It's not as simple as replacing nop 1.6 with 1.8 as the site has undergone heavy cosmetic customisation. – Greg B Nov 04 '10 at 09:02