I have been struggling with this a while now.
I implemented a basic IHttpHandler with the following code and SESSION keeps being newed up:
namespace ClassLibrary1
{
public class MyHandler : IHttpHandler, IRequiresSessionState
{
public bool IsReusable
{
get
{
return true;
}
}
public void ProcessRequest(HttpContext context)
{
context.Response.Write(context.Session.SessionID + "</br>");
context.Response.Write(DateTime.Now.TimeOfDay.ToString() + "</br>");
}
}
}
As you can see, very simple code. Then I simply create a folder c:\Inetpub\wwwroot\Test. I then add a bin folder and put my dll into the bin folder.
My web.config file then looks like this:
<configuration>
<system.webServer>
<handlers>
<add verb="*.x" path="*" name="MyHandler" type="ClassLibrary1.MyHandler" />
</handlers>
</system.webServer>
</configuration>
I then open IIS (IIS 7.0) and I have to right-click on the Test folder under default web site and click convert to application. This makes it a site.
I then go to a browser and i go to http://localhost/Test/
I then get something like this: fxnjswtkkzs1silahvpf5xun 09:48:52.9194609
If i press F5 or refresh the page, the session id changes. That is not supposed to happen.
I just cannot figure this out. And the funny thing is it did work yesterday. Can someone please help....
ps, same behaviour in firefox and ie
thanks in advance