I only implement IHttpHandler and not IHttpHandlerFactory
then I use
HttpContext.Current.Session.Add("imgVal", imgVal)
This is in VB...
Public Class imageservice
Implements IHttpHandler
Implements System.Web.SessionState.IRequiresSessionState
Public Overridable ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
Get
Return True
End Get
End Property
Public Overridable Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
Dim oPic As Byte()
Dim imgVal As String
Try
.....
HttpContext.Current.Session.Add("imgVal", imgVal)
HttpContext.Current.Response.ContentType = "image/jpeg"
HttpContext.Current.Response.OutputStream.Write(.. .., 0, oPic.Length)
Catch ex As Exception
ExceptionManager.Publish(ex)
Throw ex
End Try
End Sub
..... any other private Subs here
Hope that helps
SA
<da******************@gmail.com> wrote in message news:11**********************@g10g2000cwb.googlegr oups.com...
Tanks for your reply, can you send me an example code?. Maybe I'm doing
something wrong.
This is my actual no working code :(
internal class CustomHandler: IHttpHandlerFactory,
IRequiresSessionState
{
public CustomHandler()
{
}
#region IHttpHandlerFactory Members
public void ReleaseHandler(IHttpHandler handler)
{
}
public IHttpHandler GetHandler(HttpContext context, string requestType,
string url, string pathTranslated)
{
Page compiledPage;
compiledPage =
PageParser.GetCompiledPageInstance(url,pathTransla ted, context) as
Page;
HttpContext.Current.Session["myId"] --> null. The entired
Session object is null
--------------------------------------------------------------------------------------
Thanks!
Damian.