I have the following helper in my .cshtml file:

@Html.DropDownListFor(model => model.SkillId, new SelectList(new HCMApplication.Controllers.Classes.SSCDictionaryContainer().GetDictionary("Skills"), "Key", "Value"))

The class SSCDictionaryContainer has the access to the ASP.NET Session and the method implementation is as following

public List<DictionaryItem> GetDictionary(string dictionaryName)
        List<DictionaryItem> result = new List<DictionaryItem>();
        object o = Session["SSCDictionaries"];
        return result;

Session is NULL there (to say nothing about the "o" variable). It looks like the code is running in the separate thread, that's the only case I know for session to disappear.

How to get my Session? Any clue?


Related posts

Recent Viewed