Error: Cannot use a leading .. to exit above the top directory.

Discussion in 'ASP .Net' started by moondaddy, Dec 15, 2005.

  1. moondaddy

    moondaddy Guest

    I have a simple sample site I'm building in asp.net 2.0. I created a master
    page and a default.aspx content page in the project's root directory. Then
    I created a subfolder called content and added some aspx pages in the
    'content' folder. when these pages were created I referenced the master
    page so everything should be linked up OK. Now, back on default.aspx I
    added a linkbutton and referenced one of the aspx pages in the 'content'
    folder. When I run the project and click on that link button, I get the
    error:

    Cannot use a leading .. to exit above the top directory.

    It seems odd that something as straight forward as this wont work. This
    site will ultimately run on a shared server so I can't tweak IIS. I'm sure
    there's million or so web sites under the same circumstance where they too
    can't tweak IIS, but need to have content organized in various folders.
    What's a good work-around for this?

    btw: I saw some other similar postings and the response they got was to map
    the url at runtime via code. This seems like a step backwards since MS is
    boasting code reduction and RAD tools. Certainly, there must be a better
    way...

    --
    am
     
    moondaddy, Dec 15, 2005
    #1
    1. Advertising

  2. Hi Moondaddy,

    Welcome to aspnet newsgroup.
    From your description, you're encountering some problems developing an
    ASP.NET 2.0 web application which contains some asp.nets in root app dir
    and some other pages in sub directories. However, you're getting some
    problems when add some linking between those pages, yes?

    As for the following thing you mentioned:
    ===============
    Now, back on default.aspx I
    added a linkbutton and referenced one of the aspx pages in the 'content'
    folder. When I run the project and click on that link button, I get the
    ================

    would you provide some page's code snippet and aspx template (together with
    the application directory structure) so that we can perform some local test?

    Thanks,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)





    --------------------
    | From: "moondaddy" <>
    | Subject: Error: Cannot use a leading .. to exit above the top directory.
    | Date: Thu, 15 Dec 2005 14:40:30 -0600
    | Lines: 26
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
    | X-RFC2646: Format=Flowed; Original
    | Message-ID: <>
    | Newsgroups: microsoft.public.dotnet.framework.aspnet
    | NNTP-Posting-Host: cpe-24-175-64-176.houston.res.rr.com 24.175.64.176
    | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
    | Xref: TK2MSFTNGXA02.phx.gbl
    microsoft.public.dotnet.framework.aspnet:365188
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    |
    | I have a simple sample site I'm building in asp.net 2.0. I created a
    master
    | page and a default.aspx content page in the project's root directory.
    Then
    | I created a subfolder called content and added some aspx pages in the
    | 'content' folder. when these pages were created I referenced the master
    | page so everything should be linked up OK. Now, back on default.aspx I
    | added a linkbutton and referenced one of the aspx pages in the 'content'
    | folder. When I run the project and click on that link button, I get the
    | error:
    |
    | Cannot use a leading .. to exit above the top directory.
    |
    | It seems odd that something as straight forward as this wont work. This
    | site will ultimately run on a shared server so I can't tweak IIS. I'm
    sure
    | there's million or so web sites under the same circumstance where they
    too
    | can't tweak IIS, but need to have content organized in various folders.
    | What's a good work-around for this?
    |
    | btw: I saw some other similar postings and the response they got was to
    map
    | the url at runtime via code. This seems like a step backwards since MS
    is
    | boasting code reduction and RAD tools. Certainly, there must be a better
    | way...
    |
    | --
    | am
    |
    |
    |
     
    Steven Cheng[MSFT], Dec 16, 2005
    #2
    1. Advertising

  3. RE: Error: Cannot use a leading .. to exit above the top director

    Hi Steve,

    I got the same error code using the Starter Kit that comes with VWD Express
    Edition. I modified the starter kit by adding a couple of links to pages in
    various sub-folders.

    Everything works in the development environment. But once I publish the site
    to an intranet I could not navigate to any page that resides in a sub-folder.

    I tried everything suggested by people with related problem but nothing
    seems to work. I even diable the Enable Parent Paths on the IIS.

    It also appears that this problem has been around for a while.

    Any suggestions to solve this problem will be highly appreciated.

    Thank You

    -Tunji


    "Steven Cheng[MSFT]" wrote:

    > Hi Moondaddy,
    >
    > Welcome to aspnet newsgroup.
    > From your description, you're encountering some problems developing an
    > ASP.NET 2.0 web application which contains some asp.nets in root app dir
    > and some other pages in sub directories. However, you're getting some
    > problems when add some linking between those pages, yes?
    >
    > As for the following thing you mentioned:
    > ===============
    > Now, back on default.aspx I
    > added a linkbutton and referenced one of the aspx pages in the 'content'
    > folder. When I run the project and click on that link button, I get the
    > ================
    >
    > would you provide some page's code snippet and aspx template (together with
    > the application directory structure) so that we can perform some local test?
    >
    > Thanks,
    >
    > Steven Cheng
    > Microsoft Online Support
    >
    > Get Secure! www.microsoft.com/security
    > (This posting is provided "AS IS", with no warranties, and confers no
    > rights.)
    >
    >
    >
    >
    >
    > --------------------
    > | From: "moondaddy" <>
    > | Subject: Error: Cannot use a leading .. to exit above the top directory.
    > | Date: Thu, 15 Dec 2005 14:40:30 -0600
    > | Lines: 26
    > | X-Priority: 3
    > | X-MSMail-Priority: Normal
    > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
    > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
    > | X-RFC2646: Format=Flowed; Original
    > | Message-ID: <>
    > | Newsgroups: microsoft.public.dotnet.framework.aspnet
    > | NNTP-Posting-Host: cpe-24-175-64-176.houston.res.rr.com 24.175.64.176
    > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
    > | Xref: TK2MSFTNGXA02.phx.gbl
    > microsoft.public.dotnet.framework.aspnet:365188
    > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    > |
    > | I have a simple sample site I'm building in asp.net 2.0. I created a
    > master
    > | page and a default.aspx content page in the project's root directory.
    > Then
    > | I created a subfolder called content and added some aspx pages in the
    > | 'content' folder. when these pages were created I referenced the master
    > | page so everything should be linked up OK. Now, back on default.aspx I
    > | added a linkbutton and referenced one of the aspx pages in the 'content'
    > | folder. When I run the project and click on that link button, I get the
    > | error:
    > |
    > | Cannot use a leading .. to exit above the top directory.
    > |
    > | It seems odd that something as straight forward as this wont work. This
    > | site will ultimately run on a shared server so I can't tweak IIS. I'm
    > sure
    > | there's million or so web sites under the same circumstance where they
    > too
    > | can't tweak IIS, but need to have content organized in various folders.
    > | What's a good work-around for this?
    > |
    > | btw: I saw some other similar postings and the response they got was to
    > map
    > | the url at runtime via code. This seems like a step backwards since MS
    > is
    > | boasting code reduction and RAD tools. Certainly, there must be a better
    > | way...
    > |
    > | --
    > | am
    > |
    > |
    > |
    >
    >
     
    =?Utf-8?B?VEJERVY=?=, Jan 12, 2006
    #3
    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. Tom
    Replies:
    1
    Views:
    3,770
    Ken Schaefer
    Dec 11, 2003
  2. Simon Harris
    Replies:
    2
    Views:
    25,911
    Juan T. Llibre
    May 8, 2005
  3. Nathan Sokalski
    Replies:
    5
    Views:
    3,585
    Sergey Polyakov
    Jun 6, 2005
  4. Nathan Sokalski

    Error: Cannot use a leading .. to exit above the top directory.

    Nathan Sokalski, May 30, 2005, in forum: ASP .Net Building Controls
    Replies:
    5
    Views:
    257
    Sergey Polyakov
    Jun 6, 2005
  5. Nathan Sokalski

    Error: Cannot use a leading .. to exit above the top directory.

    Nathan Sokalski, May 30, 2005, in forum: ASP .Net Web Controls
    Replies:
    5
    Views:
    265
    Sergey Polyakov
    Jun 6, 2005
Loading...

Share This Page