Azure web app throwing error when referring to non-existent path - javascript

Is there a reason why my web app inside an Azure web app is returning a 404 error saying:
Failed to load resource: the server responded with a status of 404 ()
The path for the file is: https://WEB-APP-NAME-HERE.azurewebsites.net/resources/demos/style.css
If I look into my project files and folders, I do not have a recources folder, nor a demos folder and for sure no style.css file.
Can this message be turned of inside portal.azure.net? Or can this path be deleted so that Azure / the web app doesn't check it anymore?
Thanks in advance.

Have you searched your actual code for a reference to that file?
Or would it previously have been there and a bot is trying to re-read it?

Related

ActionView::Template::Error (The asset "application.js" is not present in the asset pipeline. ):

Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Sprockets::Rails::Helper::AssetNotFound in Conversations#index
Really need help here. I've tried multiple fixes to this issue such as:
Removing the script and placing it after .
Moving the js files into a javascript folder immediately inside the
app directory as well as in the assets/javascript folders.
None of the functions inside the properties.js file are working. Heres a link to the full project and a screenshot just in case.
Please help! I have no idea what I'm doing haha

Assets not fetched on cpanel server

I'm trying to work on cpanel before hosting my own website. And I'm very much new to this. After uploading my files on cpanel, I am getting the error and the assets folder is not read & my css & js files are not found. On localhost everything is working fine but on cpanel its not working.
I keep getting this error net::ERR_NAME_NOT_RESOLVED.
I tired looking for a solution, but most of them were regarding localhost, but the files are working on my localhost but not on cpanel.
Can anybody help me please.
Console errors:
Network JS headers:
I figured it out, the problem was the domain name, which direct the http request to the assets folder, but here I was using a free domain name that i got from infinityfree. And when i tried running the same link on a different cpanel with purchased domain name, it's loads up just fine.

For the ajax url shows 404 on the AWS tomcat log

I was using MVN install deploy my code on the AWS tomcat. I did this by directly open the AWSname:8080/manager/html and upload the WAR file(I am not sure if it is the correct way). The server can load the index.html successfully as my expectation and shows page on the front-end, but error went to call AJAX, which is in Javascript file, it always return 404. The servlet's url pattern will be like this
AJAX
Login Servlet
I tested everything fine on my localhost:8080, but in the AWS tomcat, the log showed like this.
Tomcat Log
I've never met such a case before, could somebody give me some useful suggestions on the possible solutions?
from your description it is not clear if you have multiple apps/war/containers/servers.
From your message you have a UI, which seems not to be bundled into your war file. To check in this case use these steps to check your setups
Add a index.html to your root in the war file and test if you can access it locally.
if this works, deploy on AWS and try to access the same path on AWS.
if the page is showing, your context is defined well on AWS. So you have an issue with your URL mappings
But if it does not show, you have a URL problem (wrong URL on AWS)

Azure Website 404 (Not Found) on PHP Resources

I'm new to all things coding and have tried to use Azure to host a web app. The app is JavaScript using PHP to process MYSQL data. Everything works locally as expected. But when I try to access the app where it's hosted, I see 404 (Not Found) errors on all of my calls to .php files.
I'm using jQuery's getJSON to get data:
$.getJSON('bin/myFile.php', function(data) {
// Process data
})
Then in the browser console I see:
GET https://mysite.azurewebsites.net/bin/myFile.php 404 (Not Found)
But, if I move that file to the root directory and drop the bin/ from my call, it works perfectly. All other calls to files in folders work fine (images, scripts, styles), only the php files in the bin folder return this error.
Anyone know why?
Answer from comments:
Try renaming your bin folder. That is normally where binary files are placed in a windows web app environment, so it's possible the Azure server is configured to not serve any files from that location –
Rory McCrossan
Sep 26 '17 at 16:22

How to give relative path in .js on linux platform?

I have Web UI developed in simple HTML and .js with lighttpd as web server and it is on linux based device.
I need to keep my main.html file in root directory and javascript files in js folder.
While running program it reads the javascript from js folder and the javascript accessing config files from other directories (/etc/config/myconfig). While accessing this file application giving error as 403 since I am using XMLHttpRequest, but it works when I keep myconfig file in root directory i.e with the main.html.
Please suggest is there any way to tell javascript to read file from /etc/config directory.
Error 403 :
403 Forbidden
The request was a valid request, but the server is refusing to respond to it.[2] Unlike a 401 Unauthorized response, authenticating will make no difference.[2] On servers where authentication is required, this commonly means that the provided credentials were successfully authenticated but that the credentials still do not grant the client permission to access the resource (e.g., a recognized user attempting to access restricted content).
You need give your script access to read from the directory(/etc/config).
Read about chmod/chown commands.

Categories