Web.config file is not accessing the root directory

Discussion in 'ASP.NET 2.0' started by hasan, Sep 20, 2007.

  1. hello

    i am using a url rewriting script of Scott Gu in my website. i placed a subfolder in my root folder. it was working fine. But now the web.config file is not working , the problem i sorted out is that the web.configfile is not recognizing the root directory. Any Suggestions Regarding the accessing root directory will be appreciable.

    Regards
     
  2. Are you referring to the web.config in th e root or in the sub-folder?

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Hello vikram

    i am referring the web.config file in the subfolder. The Strange thing is that it was working fine but suddenly it stops working. i had tested it lot of times. here is my web.config file







    <configuration>


    <configSections>


    <section name="rewriter" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter"/>


    </configSections>


    <system.web>


    <httpModules>


    <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter"/>


    </httpModules>


    <compilation debug="true"/></system.web>


    <system.webServer>


    <modules runAllManagedModulesForAllRequests="true">


    <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule"/>


    </modules>


    <validation validateIntegratedModeConfiguration="false"/>


    </system.webServer>


    <rewriter>


    <rewrite url="~/products/(.+)" to="~/products/products.aspx?category=$1"/>


    </rewriter>


    </configuration>

    Here is the link from which i am using this

    http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx


    (i am using the Approach 3, Extentionless urls)

    This what i have found out finally

    With IIS5 and IIS6, processing theextentionless URLs using ASP.NET is not super easy. IIS 5/6makes it hard toperform URL rewriting on these types of URLs within ISAPI Extensions (which is how ASP.NET is implemented).Instead you need to perform the rewriting earlier in the IIS request pipeline using an ISAPI Filter.


    My Server has IIS 6 with windows 2003

    So the problem may be that due to IIS 6 it may be not working , but i am still confused that it was working fine on the same server and then stopped working.

    Regards
     
  4. Bruce

    Bruce DiscountASP.NET Staff

Share This Page