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

Last post 12-30-2009 9:27 AM by MinaSamy. 54 replies.

Sort Posts:

  • Re: "Cannot use a leading .. to exit above the top directory."

    12-23-2007, 10:55 PM
    Locked
    • Contributor
      3,429 point Contributor
    • rfurdzik
    • Member since 07-01-2002, 6:32 PM
    • zikbay.com
    • Posts 1,721

    I did some trace and found out it is caused by Google search crawler...

     

    Traceroute

    Tracing route to 66.249.66.168
    HopTimeHostIPLocation
    134.215wsip-70-183-59-1.oc.oc.cox.net70.183.59.1Irvine, CA, United States
    234.11368.4.15.968.4.15.9Irvine, CA, United States
    39.885ip68-4-14-125.oc.oc.cox.net68.4.14.125Irvine, CA, United States
    49.795rsmtdsrj02-ge600.0.rd.oc.cox.net68.4.14.213Irvine, CA, United States
    539.983langbbr01-as0.r2.la.cox.net68.1.0.230Fort Walton Beach, FL, United States
    623.491cr1-pos-0-2-5-0.lay.savvis.net204.70.203.46New York, NY, United States
    724.522ber1-tenge-2-1.losangeles.savvis.net204.70.193.106New York, NY, United States
    854.737208.173.57.66208.173.57.66Cary, NC, United States
    977.989216.239.43.125216.239.43.125Mountain View, CA, United States
    1096.67766.249.95.14866.249.95.148Mountain View, CA, United States
    11101.64364.233.175.17164.233.175.171Mountain View, CA, United States
    12111.09272.14.232.3772.14.232.37Mountain View, CA, United States
    1391.234crawl-66-249-66-168.googlebot.com66.249.66.168Mountain View, CA, United States

     

  • Re: "Cannot use a leading .. to exit above the top directory."

    12-24-2007, 2:57 AM
    Locked
    • Contributor
      3,432 point Contributor
    • erdsah88
    • Member since 12-12-2004, 6:18 AM
    • ISTANBUL
    • Posts 900
    how did u fix it ?
    Satılık,Kiralık emlak ilanlari
  • Re: "Cannot use a leading .. to exit above the top directory."

    12-24-2007, 9:22 AM
    Locked
    • Contributor
      3,429 point Contributor
    • rfurdzik
    • Member since 07-01-2002, 6:32 PM
    • zikbay.com
    • Posts 1,721

    I did not. I am not sure why it happens, but I know the page is invoked by google search crawler.... Anybody knows how to fix it??? 

  • Re: "Cannot use a leading .. to exit above the top directory."

    12-24-2007, 9:38 AM
    Locked
    • Contributor
      3,429 point Contributor
    • rfurdzik
    • Member since 07-01-2002, 6:32 PM
    • zikbay.com
    • Posts 1,721

     The page in question (from the error in the application log) does not have any leading "..": http://as247gera.zikbay.com/ShowAd.aspx?id=3274

    Seems this is some kind of bug in ASP.NET: http://todotnet.com/archive/0001/01/01/7472.aspx?Pending=true 

    I have added this to web.config (suggested in http://communityserver.org/forums/p/476049/536640.aspx#536640). Let's see if it helps...

        <authentication mode="Forms">
          <forms cookieless="UseCookies"/>
        </authentication> 

  • Re: "Cannot use a leading .. to exit above the top directory."

    12-26-2007, 9:50 AM
    Locked

    When the page is being invoked by the Google search it probably is just calling a URL with no parms. Are you handling empty parms at all? Also see is you have any custom controls on your page which are built into DLLs. Review how they handle redirects if no parms supplied.

    Do you have any Server.Transfer code there?

     

    Hope this helps... 

    Tatyana Hughes

    Thanks!
  • Re: "Cannot use a leading .. to exit above the top directory."

    12-28-2007, 1:48 AM
    Locked
    • Member
      18 point Member
    • riyazakt
    • Member since 10-23-2007, 5:11 AM
    • Bangalore
    • Posts 9

     

    Hi Friends,

    I found the solution for "Cannot use a leading .. to exit above the top directory".

    This is the problem caused by master page.Suppose  your master page is in root directory and your content pages are in  subdirectory, then this problem will occur.

    This can be avoided by placing copy of the master page(in the  root directory ) into the subdirectory or folder where the content pages are existing.

    Now you make changes like the following code into the source file of the page:--

    <%@ Page Language="C#" MasterPageFile="main.master" Title="www.metamorfs.com" %>

    inseted of

    <%@ Page Language="C#" MasterPageFile="~/main.master" Title="www.metamorfs.com" %> 

    This is the problem of  ASP.NET Version:2.0.50727.42.

     

    If you have a better solution please explain better I'll gladly follow that.

    Thank you, 


      www.csharpghost.blogspot.com
  • Re: "Cannot use a leading .. to exit above the top directory."

    12-28-2007, 3:47 AM
    Locked
    • Contributor
      3,432 point Contributor
    • erdsah88
    • Member since 12-12-2004, 6:18 AM
    • ISTANBUL
    • Posts 900

    u are right but we need a better solution....

     

    any body got an idea about this asp.net bug ??

    Satılık,Kiralık emlak ilanlari
  • Re: "Cannot use a leading .. to exit above the top directory."

    12-29-2007, 7:16 PM
    Locked
    • Participant
      1,805 point Participant
    • OWScott
    • Member since 08-12-2002, 5:25 PM
    • North Carolina
    • Posts 351
    • ASPInsiders
      TrustedFriends-MVPs

    For that error, how about, instead of the ../ to go to the root folder, use a / or a ~/.  This will ensure that regardless of which folder the master page and content page is it, it can consistently find whatever you are referencing.

    Scott

    Scott Forsyth
    Director of IT
    ORCS Web, Inc
    www.orcsweb.com
  • Re: "Cannot use a leading .. to exit above the top directory."

    01-02-2008, 8:35 AM
    Locked

    If you are going to place a copy of your master page into othere places/folders you are going to end up modifying your code in two places. It is ok if you don't have much going on there but our websites have very complex Master pages and its not a good solution for us to copy the code.

    By the way same thing happens to links like <a></a> on Master pages, they don't display correctly in sub folders. The solution is to make them all server controls by adding runat=server and  use tilda sign "~". That makes them render correct.

     

    Question: Did you make changes to any code when it suddenly started happening? Think what code changes did you make...and you will find at least the place to look into.

    Thanks,

    Tatyana

    Thanks!
  • Re: "Cannot use a leading .. to exit above the top directory."

    01-12-2008, 3:49 PM
    Locked

    I had the same problem with some of my pages but when i look in my codes i found "~/../../example.aspx"  this on HTML code, so i change it to "../../example.aspx" then it is ok

    cheers !!!

     Rukshan Samanthilaka
     

    SHAN
  • Re: "Cannot use a leading .. to exit above the top directory."

    03-14-2008, 6:35 AM
    Locked
    • Member
      32 point Member
    • alisakhi
    • Member since 06-21-2006, 6:13 AM
    • Karachi, Pakistan
    • Posts 17

    I had this error when I was working with url rewriting. This is what I was doing;

    I had a link like gigznmigz.com/jobs.aspx?JobID=69

    And I rewrote like this

    gigznmigz.com/jobs/69.aspx

    I had my all files in the root folder their are no sub directories. So the problem occurs when i click some link on the page, then the browser looks for that file in /jobs/ directory, but there is no subdirectroy. Therefore it usually gives errors for script, html links. I was getting this error when i tried to signout from the urlrewritten page.

     This is how I solved the issue;

    I rewrote my url like gigznmigz.com/job_69.aspx, now this is also considered as a page in the root directory.

    I used '_' (underscore) instead of '/' (Slash).

    Hope you get this.

  • Re: "Cannot use a leading .. to exit above the top directory."

    03-14-2008, 9:16 AM
    Locked

    Well, this is an interesting way of solving it and you have an interesting cause of the problem. We tried to re-write our urls a while ago but that didn't go through the approval because Marketing had all the links in their materials referenced. Anyway, glad you were able to solve the issue. It is very interesting to watch this post as the same error happens for various reasons in different situations Wink

     

    Good luck with your coding!

    Thanks!
  • Re: "Cannot use a leading .. to exit above the top directory."

    03-26-2008, 7:34 AM
    Locked
    • Member
      248 point Member
    • arunvinoth
    • Member since 03-15-2007, 2:14 PM
    • Coimbatore, TN, INDIA
    • Posts 46

    hi..

    im doing url rewriting now..its urgent

    actually the current url is below.
                     http://localhost/mysite_UrlRewrite/CompDesc/M/2.aspx

    from this page for navigation, url should be like
                     http://localhost/mysite_UrlRewrite/Index.aspx

    but it looks like after clicking the link
                     http://localhost/mysite_UrlRewrite/CompDesc/M/Index.aspx

    how i've to move out of the folder.. from /CompDesc/M/
    i tried the ~ for aquiring root directory..but it won't..

    wats wrong..
    plz help..thanks in advance

     

    -- aruvi
  • Re: "Cannot use a leading .. to exit above the top directory."

    03-26-2008, 9:28 AM
    Locked

    I'm somewhat familiar with URL rewrite techniques but it is really hard to tell what's wrong by the urls you posted here. I hope somebody else can tell. Sorry...

    Thanks!
  • Re: "Cannot use a leading .. to exit above the top directory."

    03-26-2008, 9:51 PM
    Locked
    • Member
      32 point Member
    • alisakhi
    • Member since 06-21-2006, 6:13 AM
    • Karachi, Pakistan
    • Posts 17

    could you please provide the path you are using to redirect you page. According to me if you want to move from 2.aspx you UrlPath should be "~/mysite_UrlRewrite/inderx.aspx"

Page 2 of 4 (55 items) < Previous 1 2 3 4 Next >