Parent web physical path

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?UGF1bCBIYXRjaGVy?=

    Parent web physical path

    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?

    --
    Paul
  • Patrice

    #2
    Re: Parent web physical path

    What if you try ~/../App_Data ?

    Else another option could be to just configure the child app (either
    web.config, a virtual dir, or a web service depending on what you are trying
    to do).


    --
    Patrice

    "Paul Hatcher" <PaulHatcher@di scussions.micro soft.coma écrit dans le
    message de groupe de discussion :
    3A248166-4FB4-4190-8081-E65BABB65F94@mi crosoft.com...
    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?
    >
    --
    Paul

    Comment

    • Eliyahu Goldin

      #3
      Re: Parent web physical path

      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]




      "Paul Hatcher" <PaulHatcher@di scussions.micro soft.comwrote in message
      news:3A248166-4FB4-4190-8081-E65BABB65F94@mi crosoft.com...
      >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?
      >
      --
      Paul

      Comment

      • =?Utf-8?B?UGF1bCBIYXRjaGVy?=

        #4
        Re: Parent web physical path

        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" wrote:
        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]


        >
        >
        "Paul Hatcher" <PaulHatcher@di scussions.micro soft.comwrote in message
        news:3A248166-4FB4-4190-8081-E65BABB65F94@mi crosoft.com...
        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?

        --
        Paul
        >
        >
        >

        Comment

        Working...