Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    relative url is being returned incorrectly

    I’m receiving the following error from my ASP.Net application:
    “Exception of type System.Web.HttpException was thrown.
    C:\Inetpub\Www_root\rtcwebapp_v2\products\secure\login.aspx”

    This error is usually accompanied by a “File Not Found” error for the following file:
    “/products/secure/login.aspx”

    In my code, I’m using relative urls:
    Ex: ("~/secure/login.aspx")

    For some reason the relative url is being returned incorrectly. I noticed that the “products” directory is being added to the web application’s root. The web application path is “C:\Inetpub\Www_root\rtcwebapp_v2” but when there is an error the application path is “C:\Inetpub\Www_root\rtcwebapp_v2\products”.

    The errors only occur when “products” is included in the path. The error doesn’t happen all the time and it is happening on various pages, not just one. The IIS is configured with “C:\Inetpub\Www_root\rtcwebapp_v2” as the web application directory. I can’t figure out why the extra “products” directory is appearing in the file path! Any insight into this problem would be greatly appreciated. Thank you for your time.

    gretch

  • #2
    New Coder
    Join Date
    Mar 2007
    Posts
    76
    Thanks
    0
    Thanked 0 Times in 0 Posts
    asp.net might have decided to add your products directory as an aplication on its own, thus the relative url will point to root of the product directory. As for how to change that behavior, I'm not too sure where the configuration for that is, I never ran into that problem myself. maybe a google search on aspnet application pool or aspnet_Application_CreateApplication stored procedure or other application path related stuff would give you better results than me ^^.

  • #3
    New to the CF scene
    Join Date
    Mar 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the clues. I'll see what I can find!

    gretch


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •