URL Remapping - help needed

Discussion in 'ASP.NET / ASP.NET Core' started by pishposh, Jul 21, 2008.

  1. I am hosting my website using Windows 2008 - IIS 7.0. When I deploy my site, the URL remapping does not work. Here is a sample from the web.config file for the URL mapping.




    <urlMappings>


    <add url="~/Home" mappedUrl="~/Default.aspx"/>


    </urlMappings>


    When I go to Default.aspx, the page displays as expected. If I try to go to Home, then I get an HTTP Error 404.0 - Not Found error.
     
  2. I have the same issue. It runs fine on my local machine, but not on DiscountASP.net. Steve/support pointed me here, but I suspect it is a configuration issue, not a programming issue (?)
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    Jason123: Can you post your web.config urlMappings section?

    pishposh: if you are trying to map something that doesn't handle by ASP.net eg. /home, it will not work. If you try /home.aspx, it should work.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  4. Hi Bruce,

    I'm up and running now.
    Wildcard mapping in ASP.NET needed to be configured for my site.
    (I guess VS2008 does that automatically on my local system).

    I'm not using UrlRewriter but they walk one through the changes
    http://urlrewriter.net/index.php/su...one through a support request. Thanks, Jason
     
  5. Bruce

    Bruce DiscountASP.NET Staff

    If you are using IIS 7.0, you can do it with IIS Manager. If you are on IIS6, we'll have to do that for you.

    Anyway, glad you got this working.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     

Share This Page