Re: [Global.asax] function Server.MapPath not available ?
- From: "Juan T. Llibre" <nomailreplies@xxxxxxxxxxx>
- Date: Mon, 11 Dec 2006 22:57:02 -0400
Session_OnEnd ( or Session_End ) does not support the Request, Response or Server objects.
The only built-in objects you can use are Session and Application.
So, instead of using a Server.MapPath directive in Session_End,
store the fully qualified path in an Application variable.
You'll have no problem using an Application variable
in Session _End, provided Session_End fires at all.
There's many circumstances in which Session_End does not fire.
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/
===================================
"teo" <teo@xxxxxxxxx> wrote in message news:7rvrn2hnsi9pfb5a1rvjr9k2c8noce95rn@xxxxxxxxxx
Fortunately, in most cases, you can use a simple workaround.I tried,
Instead of calling the MapPath method, you can call the Context.MapPath method.
Or, instead of accessing the Page.Cache object, you can access the Context.Cache object.
maybe I always adopted a wrong syntax,
but I always saw the blu irregular underline
under my syntax;
I tried:
Context.MapPath
HttpContext
HttpApplication
and several other namespaces,
but always got the blu irregular underline
(and the app never started)
Do you know the exact fully namespaced syntax?
.
- References:
- [Global.asax] function Server.MapPath not available ?
- From: teo
- Re: [Global.asax] function Server.MapPath not available ?
- From: Mark Fitzpatrick
- Re: [Global.asax] function Server.MapPath not available ?
- From: teo
- Re: [Global.asax] function Server.MapPath not available ?
- From: Juan T. Llibre
- Re: [Global.asax] function Server.MapPath not available ?
- From: teo
- [Global.asax] function Server.MapPath not available ?
- Prev by Date: Re: typed dataset xsd
- Next by Date: WTD: Basic .NET document sharing application
- Previous by thread: Re: [Global.asax] function Server.MapPath not available ?
- Next by thread: Re: [Global.asax] function Server.MapPath not available ?
- Index(es):
Relevant Pages
|