404 issue to the file

Peter_1985 2,506 Reputation points
2023-01-28T08:50:16.07+00:00

Hi,

Due to issue like

User's image

What to adjust below?

<body style="background-color: ???; background-image:url(beautiful_Currency0e.jpg);">

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,263 questions
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
870 questions
{count} votes

2 answers

Sort by: Most helpful
  1. AgaveJoe 26,136 Reputation points
    2023-01-28T13:30:27.5033333+00:00

    @Peter_1985, I'm not sure why you are struggling to understand file paths on a computer system. Again, a 404 (not found) indicates the file path is incorrect or maybe the file does not exist on a remote server. The community cannot see where you saved the file on your system or the remote system if you've deployed the application.

    I created an example where "pict" folder is in the application root and beautiful_Currency0e.jpg is inside the pict folder. The path function as expected and shows a background image. Please debug/troubleshoot.

    <body style="background-image: url('/pict/beautiful_Currency0e.jpg')">
    

  2. Lan Huang-MSFT 25,556 Reputation points Microsoft Vendor
    2023-01-29T08:56:17.3033333+00:00

    Hi @Peter_1985 ,

    You need to check if there is a file called beautiful_Currency0e.jpg under your project.User's image Or you can use image url directly.

    <body style="background-color: red; background-image:url(https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/Altja_j%C3%B5gi_Lahemaal.jpg/1200px-Altja_j%C3%B5gi_Lahemaal.jpg);">

    User's image

    Best regards,
    Lan Huang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.