Also, check out this blog :
http://blogs.gotdotnet.com/mattwag/a...07/368605.aspx
There's a workaround there, by Baryon, which uses an Application variable,
and another workaround, by Naimish R. Dave, which lets you use Session variables.
Juan T. Llibre, asp.net MVP
asp.net faq :
http://asp.net.do/faq/
foros de asp.net, en español :
http://asp.net.do/foros/
======================================
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:uN**************@TK2MSFTNGP05.phx.gbl...
Are you using code-behind ?
If so, you need to use HttpContext.Current
.
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"BenCoo" <te******@hotmail.comwrote in message
news:xm**********************@phobos.telenet-ops.be...
>In my ASP.NET 2.0 application I have in the global.asax.file the following code
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs when an unhandled error occurs
This dousn't work !!! Get error "Session state is not available in this context."
Dim ex As Exception
ex = Server.GetLastError.InnerException
Session("Exception") = ex
Session("FilePath") = Server.MapPath(Me.ToString)
Response.Redirect("ErrorPage.aspx")
End Sub
I've get the error "Session state is not available in this context." when there's an error on a
page ...
Thanks for any help on this ...
Benny