resource not found error'

Last post 11-16-2006 7:09 AM by e_screw. 7 replies.

Sort Posts:

  • resource not found error'

    11-16-2006, 12:52 AM
    • Member
      15 point Member
    • giri_jazz
    • Member since 11-16-2006, 5:47 AM
    • bangalore
    • Posts 16
    I have changed the home page name to home.aspx from admin_home.aspx.
    All the references to admin_home.aspx are changed to home.aspx.
    When I run the application , my appln still searches for admin_home.aspx
    and I get 'resource not found error'
     
    I deleted the dll file and build the application again but there is no use :(
     
    Regards,
    Girija
    Girija
    Filed under:
  • Re: resource not found error'

    11-16-2006, 1:43 AM
    • All-Star
      17,710 point All-Star
    • vivek_iit
    • Member since 06-18-2006, 6:13 PM
    • New Delhi
    • Posts 3,171
    • TrustedFriends-MVPs

    Hi Girija,

    Right click home.aspx in VS and select Set as Start Page. Also, go to IIS, right click your Virtual Directory->Properties->Documents and just check if admin_home.aspx is not listed there.

    HTH,

    Vivek

  • Re: resource not found error'

    11-16-2006, 2:27 AM
    • Member
      15 point Member
    • giri_jazz
    • Member since 11-16-2006, 5:47 AM
    • bangalore
    • Posts 16

    Actually my start page is index.aspx, and it will be redirected to different home.aspx pages depending on the permissions of the user.

    My code goes like this...

    string

    strRedirect = "index.aspx";

    if(permission.Equals("USER"))

    {

    strRedirect = "users/home.aspx" + strReason;

    }

    else if(permission.Equals("SUPERUSER"))

    {

    strRedirect = "superusers/home.aspx" + strReason;

    }

    else if(permission.Equals("ADMIN"))

    {

    strRedirect = "admin/home.aspx" + strReason;

    }

    else if(permission.Equals("GUEST"))

    {

    strRedirect = "guests/home.aspx" + strReason;

    }

     And also when I open the appln in VS, I get so see the images of old version, not the latest

     ones even though they are not existing now. Is it a building error??

     

     

    Girija
  • Re: resource not found error'

    11-16-2006, 2:39 AM
    • All-Star
      19,498 point All-Star
    • e_screw
    • Member since 10-20-2004, 9:22 AM
    • Women, Guitar, Russia, Billiards, Nature, .NET
    • Posts 3,893

    Are you sure all the folders in the same root as the index page?
    Use tild before the directories, which accesses the path from root folder ex: ("~/guests/home.aspx").
    And also you are appending strReason for each strRedirect which becomes an invalid filename. If you are passing a parameter, it should read this way

    strRedirect = "~/guests/home.aspx?reason="+ strReason;

    Thanks

    Mark post(s) as "Answer" that helped you

    Electronic Screw
    Website||Blog||Dub@i.net
  • Re: resource not found error'

    11-16-2006, 2:42 AM
    • All-Star
      17,710 point All-Star
    • vivek_iit
    • Member since 06-18-2006, 6:13 PM
    • New Delhi
    • Posts 3,171
    • TrustedFriends-MVPs

    strRedirect = "superusers/home.aspx" + strReason;

    Make sure this path is relative to the root, see this article for details:

    http://msdn2.microsoft.com/en-us/library/ms178116.aspx

    HTH,

    Vivek

  • Re: resource not found error'

    11-16-2006, 3:48 AM
    • Member
      15 point Member
    • giri_jazz
    • Member since 11-16-2006, 5:47 AM
    • bangalore
    • Posts 16

    Thanks vivek and e_screw!!! The home.aspx problem is solved. If replaced the paths with  ~/admin/home.aspx.

    But the problem with images still exists. I replaced the logo.png with new logo.png in graphics directory. I am surprised because the old logo.png is no longer existing , but I still get the old image. my image path is ../graphics/logo.png.

     

    Girija
  • Re: resource not found error'

    11-16-2006, 5:03 AM
    Answer
    • All-Star
      17,710 point All-Star
    • vivek_iit
    • Member since 06-18-2006, 6:13 PM
    • New Delhi
    • Posts 3,171
    • TrustedFriends-MVPs

    Girija,

    You can use the "~" operator with images too, you just need to add runat="server" and and "id" attribute to the <image> tag. This will make sure that the images are referenced from thr right directory.

    Also, try to delete all images by the old name so that there is no confusion.

    Vivek

  • Re: resource not found error'

    11-16-2006, 7:09 AM
    • All-Star
      19,498 point All-Star
    • e_screw
    • Member since 10-20-2004, 9:22 AM
    • Women, Guitar, Russia, Billiards, Nature, .NET
    • Posts 3,893

    yes, as said, always use the full virtual path, which you can get upto the root by using ~ operator.

    Thanks

    Mark post(s) as "Answer" that helped you

    Electronic Screw
    Website||Blog||Dub@i.net
Page 1 of 1 (8 items)