Angular 5 - Failed to Load Resource: the Server Responded With a Status of 404 (Not Found)

Failed to load resource: the server responded with a status of 404 (Not Found) angular js + ionic

404 literally means that file was not found. It's simple as that. Check if the URL is right, and there are no rediretions being done(use fiddler). Perhaps the protocol should be https:// istead of http://? Perhaps you need "www" in url?

Click the url given in Chrome and see if the file exists.

Failed to load resource: the server responded with a status of 404 (Not Found) in ion-calendar

The same error I get for my Ionic icons. What I'm doing is

  1. Clearing my browser cache (I'm using Chrome).
  2. Ticked disable cache at network tab of dev console at my chrome browser.
  3. Restart my browser and application.

and my error is fixed after I'm doing those steps.

Failed to load resource: the server responded with a status of 404 (Not Found)-lab-logo.png

Here's a quick fix:

Go to

/your-project/node_modules/@ionic/lab/www/index.html



Update the inline CSS in the head as follows:

Change this (old):

   #logo {
display: inline-block;
vertical-align: middle;
background: url('lab-logo.png');

To this:

 #logo {
display: inline-block;
vertical-align: middle;
background: url('./assets/lab-logo.png')

Angular 5: Failed to load resource: the server responded with a status of 404

Since the controller is decorated with a route attribute, you should simplify the method route to something like this (untested):

[Route("api/[controller]")]
[ApiController]
public class StringsController : Controller
{
SSDMContext db = new SSDMContext();

// GET: api/student
[HttpGet]
[Route("Index")]
public IEnumerable<Strings> Index()
{
return db.Strings;
}
}

Now you should be able to request api/Strings/Index



Related Topics



Leave a reply



Submit