« Previous Next »

Thread: Cannot use a leading .. to exit above the top directory - IIS/ASP.NET

Last post 01-04-2009 12:02 PM by Madness80. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 01-03-2009, 4:17 PM

    Cannot use a leading .. to exit above the top directory - IIS/ASP.NET

      Hi,
    I can run my Employer website in my local machine when I run it from the visual studio.
    But, I uploaded the site now. I can access all aspx pages except the pages in 'Employer' folder.
    Employer folder should be accessed by Employer and Administrator roles. I already set those roles in my ASP.NET Administrator tool. When I try to login as an Employer and try to access the pages like ~/Employer/Default.aspx, I can't access them. I can access them when I run it in  my local machine from Visual Studio. I don' t find any error in my database. Any idea.

    The error which  I am getting now is:-

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


    Thanks

  • 01-03-2009, 5:32 PM In reply to

    Re: Cannot use a leading .. to exit above the top directory - IIS/ASP.NET

     Do you have parent paths enabled? Web site properties, home directory tab, configuration button, options tab. Select enable parent paths.

  • 01-03-2009, 6:44 PM In reply to

    Re: Cannot use a leading .. to exit above the top directory - IIS/ASP.NET

     Yes, I did it already, but no improvement.

    Thanks

  • 01-03-2009, 7:21 PM In reply to

    Re: Cannot use a leading .. to exit above the top directory - IIS/ASP.NET

     Thanks for your help.

    I set the parent path already. My web.config file is this. I don't know whether there is any error or not.

    <?xml version="1.0"?>
    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
        <configSections>
            <section name="Thetest" type="MB.Thetest.ThetestSection, __code"/>
        </configSections>
        <Thetest defaultConnectionStringName="SS_ConnectionString">
            <contactForm mailTo="test@test.com"/>
        <employer WorldPayMode="true" businessEmail="test@test.com" />

        </Thetest>
      <connectionStrings>
        <remove name="SS_ConnectionString"/>
        <add name="SS_ConnectionString"
              connectionString="Data Source=MYSYSTEM\SQLEXPRESS;Initial Catalog=test;Integrated Security=SSPI;"
              providerName="System.Data.SqlClient"/>
      </connectionStrings>
      <system.web>
        <authentication mode="Forms">
          <forms cookieless="AutoDetect" loginUrl="~/AccessDenied.aspx"  name="SS_FormAuthentication"/>
        </authentication>



        <pages theme="MainTheme" masterPageFile="~/Site.master" maintainScrollPositionOnPostBack="true">
          <!-- <pages>  -->
          <controls>
            <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
            <add tagPrefix="ajaxToolkit" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit"/>
          </controls>
        </pages>
            <!--
          Possible modes are "transitional", "strict", and "legacy".
          <xhtmlConformance mode="transitional" />
          -->


        <compilation debug="true">
          <assemblies>
            <add assembly="System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
            <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            <add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            <add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
          </assemblies>
        </compilation>


        <httpHandlers>
          <remove verb="*" path="*.asmx"/>
          <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
          <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
        </httpHandlers>
        <httpModules>
          <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        </httpModules>
        
        <membership defaultProvider="test_MembershipProvider" userIsOnlineTimeWindow="15">
          <providers>
            <add name="test_MembershipProvider" connectionStringName="SS_ConnectionString"
                 applicationName="/" enablePasswordRetrieval="true" enablePasswordReset="true"
              requiresQuestionAndAnswer="true" requiresUniqueEmail="true"
              passwordFormat="Encrypted" maxInvalidPasswordAttempts="5"
              passwordAttemptWindow="10" minRequiredPasswordLength="5"
              minRequiredNonalphanumericCharacters="0" type="System.Web.Security.SqlMembershipProvider, System.Web, &#xA;          Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
          </providers>
        </membership>
        <siteMap defaultProvider="test_SiteMapProvider" enabled="true">
          <providers>
            <add name="test_SiteMapProvider" type="System.Web.XmlSiteMapProvider" securityTrimmingEnabled="true" siteMapFile="web.sitemap"/>
          </providers>
        </siteMap>
        <sessionState cookieless="AutoDetect"/>
        <roleManager enabled="true" cacheRolesInCookie="true"
                     cookieName="SS_ROLES" defaultProvider="SS_RoleProvider">
          <providers>
            <add connectionStringName="SS_ConnectionString" applicationName="/" name="SS_RoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
          </providers>
        </roleManager>
        <anonymousIdentification cookieless="AutoDetect" enabled="true"/>
        <profile defaultProvider="SS_ProfileProvider">
          <providers>
            <add name="SS_ProfileProvider" connectionStringName="SS_ConnectionString" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
                </providers>
          <properties>
            <add name="Title" type="String"/>
            <add name="FirstName" type="String"/>
            <add name="LastName" type="String"/>
         
          </properties>
            </profile>
            
            <machineKey validationKey="287C5D125D6B7E7223E1F719E3D58D17BB967703017E1BBE28618FAC6C4501E910C7E59800B5D4C2EDD5B0ED98874A3E952D60BAF260D9D374A74C76CB741803" decryptionKey="5C1D8BD9DF3E1B4E1D01132F234266616E0D5EF772FE80AB" validation="SHA1"/>
            <customErrors mode="RemoteOnly" defaultRedirect="~/Error.aspx">
                <error statusCode="404" redirect="~/Error.aspx?code=404"/>
                <error statusCode="408" redirect="~/Error.aspx?code=408"/>
                <error statusCode="505" redirect="~/Error.aspx?code=505"/>
            </customErrors>
        
        </system.web>



      <system.net>
        <mailSettings>



            <smtp deliveryMethod="Network"
                      from="test@test.com">
                <network
                    host="11.111.111.111"
                    userName="test@test.test.local"
                    password="abc"
                    port="25" />
            </smtp>
          
          


        </mailSettings>
      </system.net>



    </configuration>

  • 01-04-2009, 12:02 PM In reply to

    Re: Cannot use a leading .. to exit above the top directory - IIS/ASP.NET

     See  http://todotnet.com/archive/0001/01/01/7472.aspx?Pending=true

    If you google for that error, there are quite a number of hits. Hope they point you in the right direction. 

    Fiddler2 is a great tool to debug http requests. That might help you. http://www.fiddlertool.com/Fiddler2/version.asp

Page 1 of 1 (5 items)
Microsoft Communities