www.webdeveloper.com
Results 1 to 12 of 12

Thread: Files not loading

  1. #1
    Join Date
    Mar 2006
    Posts
    10

    Exclamation Files not loading

    When deploying my web page the images and movies built in are not loading. The paths all apear to be correct (The url's were not entered in the source code directly, but instead through the properties window in Visual Studio 05), however the files they point to are not seen as being there. The files are there on the server.

    There is an extremely simple start to a page at: bklare.somee.com which you can go to and see this.

    Any thoughts? Could the issue be with the compilation?

  2. #2
    Join Date
    Nov 2004
    Location
    Toronto
    Posts
    20
    the image on your site has a path of :
    http://bklare.somee.com/App_Data/PPE_final_version.gif

    is that correct? I tried it in my browser and it couldn't find anything. Either you dont have that folder /App_Data/ on your web server, or its empty.

    hth,
    mcm
    ---------------------------------------
    McM

  3. #3
    Join Date
    Mar 2006
    Posts
    10
    Yes, all the files are there in the folder 'App_Data'.

    I cannot think of any reason why this would these files are not being located. I even tried put this "site" on another server my buddy has on godaddy and the same problem occured.

  4. #4
    Join Date
    Apr 2005
    Posts
    634
    Quote Originally Posted by bklare
    Yes, all the files are there in the folder 'App_Data'.
    I cannot think of any reason why this would these files are not being located.
    If my guess is correct, I bet you call the path directly from your code behind using a string isn't?
    (i.e: c:\inetpub\wwwroot\(name of ur application\App_Data\PPE_final_version.gif )

    ASP.net won't work like that because ASP.net is setup based on Virtual Directory, and the dll file who handles VD is actually locate at win32/ folder.

    say if your application is call blahblahblah sits at wwwroot/blablahblah/ and you make your asp.net application to generate a file, it won't sit at C:\, it will sit at somewhere else. (sytem32, or win32, i forgot...)

    You'll need to use the Server Object. for example...

    Server.MapPath("App_Data\PPE_final_version.gif")

    see if it helps

  5. #5
    Join Date
    Mar 2006
    Posts
    10
    No, that is not the issue. The path I use, for example, is:

    ImageUrl="~/App_Data/home_button.jpg"

    Which is the way Visual Studio sets it.

    Any other thoughts???

  6. #6
    Join Date
    Apr 2005
    Posts
    634
    1) what is the list of your directory look like?
    2) are you sure there's no mispell file name and stuff?
    3)You don't happen have anything fancy such as a ascx file in 1 folder, aspx file in other folders (or root folders), then your image is locate in ~/App_Data folder off from your ascx files instead of off your aspx files right? (have i confused you yet?)

  7. #7
    Join Date
    Mar 2006
    Posts
    10
    If you click on the link below it will show the whole tree listed. I don't think any of the situations you mentioned are present. (This is before being compiled).

    Screen Shot

    I am currently deploying a precompiled version of this "website", could this be the issue?

    Any other ideas????

    Thanks for the responses.

  8. #8
    Join Date
    Apr 2005
    Posts
    634
    I'm almost run outta ideas, and seems like we are not getting any closer to a solution huh?

    1) it won't be permission problem is it? Does the folder contain the pictures have read access?

    2) you don't have a panel hiding it?

    3) did you set visable = false?

    4) you don't happen to let the dark blackground picture covers the image?

    5) are there any other color that is sitting on top of the image?


    p.s: it shouldn't be compile issue, all compile does is to bring your code from high level language translate to low level language, and let IIS translate those language into HTML/Javascript (because thats all browsers can understand). if a path is c:\blahblah\lalala, before compile or after compile must stay the same.

  9. #9
    Join Date
    Mar 2006
    Posts
    10
    I believe it is any of those issues. Visible is set to true on all of the pics, and i am unaware of how to even have the background cover it.

    From those points you mentioned, though, those images are all part of a master page. Do you think that could be causing the issue?

    Thanks for your replies.

    -B

  10. #10
    Join Date
    Apr 2005
    Posts
    634
    Quote Originally Posted by bklare
    From those points you mentioned, though, those images are all part of a master page. Do you think that could be causing the issue?
    HA! I got a gut feeling we are getting 1 step closer.

    For the record, I'm not familiar with ASP.NET2.0, therefore my solution could be wrong (again), but this is how I would tackle this problem:

    Review where is the master page is locate, and where are the aspxs are located.

    I believe you might have 1 folder keeps the master page, and other folders keeps the aspx (or ascx) pages.

    for example, lets say you got 2 folders in your asp.net web application: /Main, and /Src. Inside your /Main folder, you got another folder call /Pic where stores all the pictures.

    Suppose your master page is locate under /Main, and your aspx pages are locate under /Src. it make sense for Master Page to call its picture by doing: string url = "Pic/blahblah.png" right?

    But if it is your aspx call the pictures through master page, will "Pic/blahblah.png" still gonna work? You don't have a /Pic folder under /Src though.

    Again, I could be wrong, but this is the approach I would follow:

    Move the image to the same folder as the aspx page (or master page) see if it loads, if it does...slowly move the picture 1 folder level at a time back to the folder where it suppose belongs to. And to adjust your path accordingly.

    See if that helps...

  11. #11
    Join Date
    Mar 2006
    Posts
    10
    Sirpelidor,

    Ok, first off, sorry I havn't gotten back to your reply; I was away on business.

    The problem is solved. You guided me on the right track with your last response. The issue has something to with the app_data folder. This is a folder that is used by Visual Studio 2005 supposedly to store image files and such. Either way, when I placed all of my media in a different folder it all worked fine. Pretty dumb, especially considering the time I spent thinking of a more complicated reason for it not working!

    Anyways, thanks for your time and help.

    -B

  12. #12
    Join Date
    Apr 2005
    Posts
    634
    I'm glad that all worked out cheer

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles