Parent web physical path

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?
 
P

Paul Hatcher

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top