Click here to Skip to main content
15,892,927 members

Comments by Zoltan Aszalos (Top 4 by date)

Zoltan Aszalos 14-Mar-11 6:34am View    
Thank you Stops. Finally I realised what the problem was. As I wrote in my last comment I used an xml file to save the results in it. I figured out that if I leave the doc.Save("path"); code in then the Session values are not kept. I removed the file manipulation code from the ProcessRequest method and everything worked just fine. This whole thing drove me crazy, but finally it's over. Nonetheless I can't figure out why on earth would the file manipulation code reset the session values.
Anyway, many thanks for your assistance.

Have a good day and happy coding.
Zoltan Aszalos 14-Mar-11 4:42am View    
Hi,

I tried to put a string value into the session:

var doc = XDocument.Load (@"c:\XO_Game_Website\bin\test.xml");

if (context.Session ["something"] == null)
{
context.Session.Add("something", "something");

doc.Root.Element ("xxx").Value = "null";
}
else
{
doc.Root.Element ("xxx").Value = "not null";
}

Every time the "null" text value is written into the file.
Zoltan Aszalos 11-Mar-11 8:59am View    
This is from web.config: <sessionstate cookieless="false" mode="InProc" timeout="20">

I checked the session id and it is the same, it doesn't change on each request, but the values I store in Session are lost.
Zoltan Aszalos 11-Mar-11 7:04am View    
Hi Stops,

No I don't access an ASP.NET page. I just type in http://localhost:83/test.test in the browser and that's all. I tried to save something in context.Session even at the first call to ProcessRequest but next time, the value was gone, and I still can't use context.Session.
What else could I try ?