What is the best way to configure this?

Discussion in 'ASP .Net' started by TJ, Sep 10, 2008.

  1. TJ

    TJ Guest

    Hi,

    Env : ASP.NET 2.0 / C#

    Long time ago, I developed one asp.net WebApp
    This structure is..
    /WebApp (Virtual Directory)
    |--- Web.config
    |--- Master and aspx files...

    In this aspx page, I used ~ to reference the master pages.

    Now, I am developing different app, but I need these same web pages into the
    subfolder of OldWebApp under NewWebApp virtual directory.....like this..

    /NewWebApp (Virtual Directory)
    |----- Web.config
    |----- OldWebApp (Folder)
    |--- Copied here from above WebApp Master and ASPX page
    files..

    The problem I found is that since I used ~ to reference MasterPage...,
    I wasn't able to browse the OldWebApp because it tries to find the MasterPage
    under NewWebApp, not the OldWebApp.

    Is there any way I can configure this correctly WITHOUT modifying the source
    code
    or moving the master page to under NewWebApp?...

    Maybe somehow set by web.config for the OldWebApp folder??
    In that way, under OldWebApp, ~ will refer from OldWebApp folder, not
    from NewWebAp...or other way?...possible?

    I would like to keep these files in this structure for better maintenance,
    if I can..

    Hope you understand my issue.

    Thanks,
    TJ, Sep 10, 2008
    #1
    1. Advertising

  2. TJ

    TJ Guest

    Well...In short, my question is that...
    Is there any way I can override ~ behavior in web.config?

    This is one of wish examples
    If I set this way in the web.config..
    <location path="OldWebApp">
    <RootRelativeFrom>OldWebApp</RootRelativeFrom>
    ....
    </location>

    Something like that...This means that..
    If I use ~ in any pages in the OldWebApp folder, the root will be from
    OldWebApp folder, NOT the root of the web application.....

    Any possible way to do this?

    Thanks,


    "TJ" wrote:

    > Hi,
    >
    > Env : ASP.NET 2.0 / C#
    >
    > Long time ago, I developed one asp.net WebApp
    > This structure is..
    > /WebApp (Virtual Directory)
    > |--- Web.config
    > |--- Master and aspx files...
    >
    > In this aspx page, I used ~ to reference the master pages.
    >
    > Now, I am developing different app, but I need these same web pages into the
    > subfolder of OldWebApp under NewWebApp virtual directory.....like this..
    >
    > /NewWebApp (Virtual Directory)
    > |----- Web.config
    > |----- OldWebApp (Folder)
    > |--- Copied here from above WebApp Master and ASPX page
    > files..
    >
    > The problem I found is that since I used ~ to reference MasterPage...,
    > I wasn't able to browse the OldWebApp because it tries to find the MasterPage
    > under NewWebApp, not the OldWebApp.
    >
    > Is there any way I can configure this correctly WITHOUT modifying the source
    > code
    > or moving the master page to under NewWebApp?...
    >
    > Maybe somehow set by web.config for the OldWebApp folder??
    > In that way, under OldWebApp, ~ will refer from OldWebApp folder, not
    > from NewWebAp...or other way?...possible?
    >
    > I would like to keep these files in this structure for better maintenance,
    > if I can..
    >
    > Hope you understand my issue.
    >
    > Thanks,
    >
    >
    TJ, Sep 10, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. HS1
    Replies:
    0
    Views:
    444
  2. Diego Martins
    Replies:
    5
    Views:
    5,246
    Diego Martins
    Jun 19, 2007
  3. Vinay Sajip

    A new way to configure Python logging

    Vinay Sajip, Oct 22, 2009, in forum: Python
    Replies:
    0
    Views:
    479
    Vinay Sajip
    Oct 22, 2009
  4. Vinay Sajip
    Replies:
    0
    Views:
    462
    Vinay Sajip
    Oct 24, 2009
  5. Alex
    Replies:
    12
    Views:
    659
Loading...

Share This Page