Re: what is SERVER a member of?
- From: "darrel" <notreal@xxxxxxxxxxx>
- Date: Tue, 16 Aug 2005 13:56:53 -0500
> From what I can tell this will not help the OP as the MapPath method is
not
> static
I'm not quite sure what you mean by that.
Specifically, I'm taking a virtual path:
/documents/shared/ and mapping it to the actual server, be it my local one
when testing or the live server when deploying.
> To reply to the original question. Server is an instance member of the
Page
> class
Ah! Well, that explains it.
> 2. Use HttpContext.Current.Server.MapPath(). Through a bit of trickery
> (well, thread local storage) this can dig out the server object associated
> with the current request. N.B. If you call this function from a thread
that
> is not processing an HTTP request, it will barf at runtime.
This may be a naive question, but aren't all ASP.net threads part of a HTTP
request (ie, postbacks?)
-Darrel
.
- Follow-Ups:
- Re: what is SERVER a member of?
- From: Andy Fish
- Re: what is SERVER a member of?
- References:
- what is SERVER a member of?
- From: darrel
- Re: what is SERVER a member of?
- From: Juan T. Llibre
- Re: what is SERVER a member of?
- From: Andy Fish
- what is SERVER a member of?
- Prev by Date: Re: Image with textbox embedded inside
- Next by Date: Re: HTML 2 ASP.NET ?
- Previous by thread: Re: what is SERVER a member of?
- Next by thread: Re: what is SERVER a member of?
- Index(es):
Relevant Pages
|