0

I have application which I deploy to Azure and suddenly I catch one error which wasnt in my local machine when I tested application.

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

SO when I tested application in my local machine everything works perfect without any errors, and when I move to test application live on server many option doesnt work, and in console manager I get this kind of error. Any help, what can be problem here ?

  • Is it in some kind container or as Application in IIS inside virtual machine in Azure? May be not all nuget packages been resolved or needed framework not installed on that test machine. All that I can suggest is to log every action to application insight in Azure or to you custom logger like papertrail. And see where it crashes and what is missing. Logging is the key to resolve problems in live environment where you cannot debug. – maximelian1986 Sep 13 '18 at 09:27
  • The problem is that in local machine everything work perfect, without any errors. But in live server I get error that some files missing starting from icomoon.woff:1 I check directory and this file is contain in application, I check script tag and everything is OK –  Sep 13 '18 at 09:33
  • 1
    Then use relative path and not absolute for those resources – maximelian1986 Sep 13 '18 at 09:34

1 Answers1

0

404 is resource not found error. Most probable reasons are your files are in “../“ folder and you are trying to access file in “../..” folder.

I would suggest using URLs like /Folder/subfolder instead of relative URLs like “../parentfolder/subfolder”.. Also, its good to use “~”..

More on paths here:

https://msdn.microsoft.com/en-us/library/ms178116.aspx

Gauravsa
  • 6,330
  • 2
  • 21
  • 30
  • Thank you for posting answer but as I see from project folder and subfolder everything is OK and when I run application in localhost I didnt get any error, but when I deploy application to Azure I get error that some of icons icomoon.woff:1 are missing. Have no idea how ? –  Sep 13 '18 at 09:38
  • 1
    Need to .woff extension to web.config. – Gauravsa Sep 13 '18 at 09:54
  • 1
  • 1
    See here: https://stackoverflow.com/questions/22317206/failed-to-load-resource-the-server-responded-with-a-status-of-404-not-found – Gauravsa Sep 13 '18 at 09:54