i checked in chrome developer mode the cookie ASP.NET_SessionId is being created with the right sessionid.
but now once i come into the dashboard the translations will be loaded (as this is the first place my imtranslate directive will be used)
[WebMethod(EnableSession = true)]
public List<DictionaryEntry> getTranslations()
{
General g = new General();
var ps = g.NewPageSorter(); // ps retrieves session variables used in the login
var resPath = HttpContext.Current.Request.PhysicalApplicationPath + "App_GlobalResources\\inMedio.resx";
var t = new System.Resources.ResXResourceReader(resPath);
var myList = new List<DictionaryEntry>();
foreach (DictionaryEntry item in t)
{
myList.Add(item);
}
return myList;
}
it's not a full method yet but it should work but once i try to get my old session vars it seems they're empty and my session wasn't saved.
when i check httpcontext.current.session i see there is a new session instead of using the old one.
it seems to me the session cookie is just being ignored.
Contributor
2186 Points
832 Posts
angularjs and asp.net sessions
Apr 24, 2015 05:55 AM|sp00k|LINK
i made a little website with a login and translations, for the translations i need to check the session for what language it should get.
on my login i send back this dtologin which includes sessionid.
in my rootscope i have my login function (which is working)
i checked in chrome developer mode the cookie ASP.NET_SessionId is being created with the right sessionid.
but now once i come into the dashboard the translations will be loaded (as this is the first place my imtranslate directive will be used)
it's not a full method yet but it should work but once i try to get my old session vars it seems they're empty and my session wasn't saved.
when i check httpcontext.current.session i see there is a new session instead of using the old one.
it seems to me the session cookie is just being ignored.
Contributor
2186 Points
832 Posts
Re: angularjs and asp.net sessions
Apr 27, 2015 10:56 AM|sp00k|LINK
these lines in web.config of my service project fixed it