|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Which server am I on?
My ISP has parent paths disabled, and my local box does not. I'd like to
be able to tell where a page is executing so I can code an if statement for my db connection strings. if RunningOnThag then Server.MapPath("../fpdb/materiale.mdb") else Server.MapPath("/fpdb/materiale.mdb") end if TIA, Mike MikeR wrote:
> My ISP has parent paths disabled, and my local box does not. I'd like Request.ServerVariables("SERVER_NAME")> to be able to tell where a page is executing so I can code an if > statement for my db connection strings. > > if RunningOnThag then > Server.MapPath("../fpdb/materiale.mdb") > else > Server.MapPath("/fpdb/materiale.mdb") > end if .. -- Microsoft MVP - ASP/ASP.NET Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM" Request.ServerVariables("Server_Name")
Bob Lehmann Show quote "MikeR" <nf4lNoSpam@pobox.com> wrote in message news:exk25PgRGHA.2300@TK2MSFTNGP11.phx.gbl... > My ISP has parent paths disabled, and my local box does not. I'd like to > be able to tell where a page is executing so I can code an if statement > for my db connection strings. > > if RunningOnThag then > Server.MapPath("../fpdb/materiale.mdb") > else > Server.MapPath("/fpdb/materiale.mdb") > end if > > TIA, > Mike > > |
|||||||||||||||||||||||