It all depends on the context in which you have your code.
Using Dynamicweb.eCommerce.Common.Context tells you that you're in session scope. That means you're asking for the LanguageID from the frontend. So the question is: do you have a frontend upon asking?
You could provide your entire class to make further help easier.