Parent web physical path

  • Thread starter Thread starter Paul Hatcher
  • Start date Start date
P

Paul Hatcher

I have a setup with two web applications, call them parent and child where
child is web application held virtual underneath parent though not physically.

What I'd like to be able to do is write into parent/App_Data from the child
app, but apart from hard-coding the actual directory into the parent's
web.config I can't determine the location within child; if I evaluate
"~/App_Data" from child then of course it's relative to the child's physical
location.

Does anyone know a nicer way of finding this out?
 
The child is an admin app and there are actually around 20 parents apps so I
was trying to avoid doing anything at the child, but with a bit of work I
should be able to do it...

P1/App_Data -> child/App_Data/P1
P2/App_Data -> child/App_Data/P2
etc...

and in the parent web config I set the SiteName to so it knows which sub
directory to operate against.

--
Paul


Eliyahu Goldin said:
A web application can't go higher than the root application folder. Try
making another virtual directory under the child application root and map it
to the same physical directory as parent/App_Data.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


Paul Hatcher said:
I have a setup with two web applications, call them parent and child where
child is web application held virtual underneath parent though not
physically.

What I'd like to be able to do is write into parent/App_Data from the
child
app, but apart from hard-coding the actual directory into the parent's
web.config I can't determine the location within child; if I evaluate
"~/App_Data" from child then of course it's relative to the child's
physical
location.

Does anyone know a nicer way of finding this out?
 
Back
Top