How can I get the application's virtual directory from the
Application_Start method in Global.asax ?
Keep in mind there is no request/response object available yet in this
stage.
Thanks
Saar.
AppDomain.CurrentDomain.BaseDirectory
> Thanks
> Saar.
--
AZ [Microsoft - .NET MVP]
Mia Home page: http://ciclismo.sitiasp.it
Asp.Net community: http://www.aspitalia.com
Il mio blog: http://blogs.aspitalia.com/az
Nah.
That will return the physical directory, not the virtual dir.
Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================
"Andrea Zani" <and...@aspitalia.com> wrote in message
news:0uZLe.17346$F23.2...@twister2.libero.it...
Ops, :)
For read the virtual dir:
dim path as string=AppDomain.CurrentDomain.FriendlyName
path=path.Substring(path.LastIndexOf("/"))
path=path.Substring(0,path.IndexOf("-"))
Response.write(path)
I also wrote a working kludge.
Yours is a bit more elegant, though.
Thanks.
Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================
"Andrea Zani" <and...@aspitalia.com> wrote in message
news:09%Le.18204$HM1.4...@twister1.libero.it...
Good solution!