0

I am using Sitecore version 8.2 update 2 Glass.Mapper.Sc.Min82 (version 4.5.0.4)

I see the Null Reference Error in this line inside the controller. var context = new SitecoreContext(); //Throwing exception here

System.NullReferenceException: 'Context is null'.

enter image description here

Any thoughts?

  • Please clarify where this code is executing (in a rendering, in a background task, something other). – Mark Cassidy Apr 19 at 14:12
  • Its inside a controller rendering. – sai Apr 19 at 17:41
0

It worked after I removed and added back the Sitecore.Kernel reference and then uninstalled and reinstalled the glass.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.