Getting 404 - File or directory not found when downloading a file - iis

I have hosted a web API which written in laravel on the IIS server. There is one "versionUpgrate" API where the app asks the server to send the link to an apk file to download if there is any version is out.
"
But when I execute the below URL in the browser, I am getting "404 - File or directory not found". I am expecting the file should get downloaded here.
https://xxxx.xxxx/apk/beta_4_22_2.apk
Don't know what is blocking it here?
--------------EDIT --------------------
I believe laravel is not blocking it because this apk folder exists in the public folder. So URL is accessible.

You can try to add the type to IIS MIME Types.
Open IIS Manager
Selection "MIME Type" feature
Add...
type Extension ".apk" and MIME type "application/vnd.android.package-archive"
OK

Related

IIS always search file in the wrong directory

On my PC (Windows 10) I wrote a new website (VB windows forms, .aspx files).
If I run the site from inside Visual Studio 2019, all OK, it starts and run correctly.
Now I need to have this site always "ON", I installed IIS, configured a "new website", name, directory and so on. I configured the new website in IIS to the directory where I develop, not in wwwroot.
Nothing works: I always have a 404 error.
To simplyfy everything I wrote a simple .HTML file, "prova.html", I placed it in the real website directory, and I tested it with Firefox: http://127.0.0.1/test.html.
Still 404:
URL requested http://127.0.0.1:80/prova.html
Physical path C:\inetpub\wwwroot\prova.html
It seems that IIS ALWAYS searches the file in the wrong path, but I configured the correct directory where the file is.
Of course if I place my test file in "inetpub\wwwroot ..." IIS finds and opens the file.
Any suggestion?
You can refer to the following steps to deploy the project in IIS:
Right click on your project and select publish:
Then add the site in IIS:
Solved ... installing IIS I didn't install the .NET part ... I feel very stupid.

wwwroot doesn't exist in inetpub

I installed IIS on my computer, but when I try to load localhost on google chrome it's says
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information:
Module IIS Web Core
Notification Unknown
Handler Not yet determined
Error Code 0x80070003
Config Error Cannot read configuration file
Config File \?\C:\inetpub\wwwroot\web.config
Requested URL http://localhost:80/
Physical Path
Logon Method Not yet determined
Logon User Not yet determined
I also don't have wwwroot in my inetpub folder and I think that's why the error above appears. I created then my wwwroot folder in the ineptpub folder, but I have a new error: HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
What can I do in this situation?

Express JS not serving few static files, throws 500 internal server error

When express server is started with SPA application index file and few other static files are loaded and some files throw 500 error
NodeJS server is running, and serving the static files from the correct folder. (This can be confirmed as it loads index.html and some other assets)
As seen from the network tab scripts.2d2e0c1a64a29c086e01.js, jspdf.min.js, favicon are loaded from the same static folder, but other js files are not loaded.
When error files are opened with full link (localhost:3000/main-es2015.b21fb6bfbdb8538cc020.js) these files are also loaded aswell.
The static folder contains the build files from angular 8.
Same issue when tried with nginx reverse proxy config.
Any help is much appreciated. Thank you
I found that the new URL wasn't allowed in the Content Security Policy list, once adding it everything works as expected. Thank you.
I had a similar error -- HTTP 500 when requesting an image from Express -- and corrected it by granting more permission to the static files. When the error was happening, the image file had permissions -rw-rw----. I used sudo chmod 666 public/static/*.jpg to change this to -rw-rw-rw-, and the problem was solved.

How to get freb.xsl file in IIS_FailureTrace directory

I am running IIS on Windows Server 2012 R2. I follow the follow steps to enable 'failed request tracing' in IIS:
http://blogs.msdn.com/b/kishorerajendran/archive/2015/05/08/iis-failed-request-tracing.aspx
I get a fr000001.xml file in my 'DataDir\Logs\IIS_FailureTrac directory, but there is no freb.xsl file. I tried go to IE and do http://localhost, that does not help.
How can I get the freb.xsl file?
On Windows Server 2008 R2, I completely deleted the W3SVC1 folder in C:\inetpub\logs\FailedReqLogFiles\ .Then I requested again the page with my error. The folder W3SVC1 was recreated, and this time it contained my failed request .xml as well as freb.xsl. (if that doesn't work, you could be lucky, try from a dos prompt, from c:\, dir freb.xsl /s. I've got multiple copies of it for iis, iisexpress, multiple web sites, etc... it's in My Documents\IISExpress\TraceLogFiles for example)

How to install VQmod extension for opencart 2.0.x.x without using FTP

I have installed vqmod extension for opencart 2.0.1.0 from following link
http://www.opencart.com/index.php?route=extension/extension/info&extension_id=19501
I have followed installation steps till replaced files.
Now, how I should upload Opencart modifications on localhost.
On admin panel made following setting System->Setting->Store Edit->FTP
FTP Host : localhost
FTP Port : 22
FTP Username : XXXXXX
FTP Password : ******
FTP Root : C:\wamp\www\xxxx
Enable FTP : Yes
But still vqmod is not installed.So, where I am going wrong.
Note: I have made many changes in core files of opencart.
Hope so which doesn't affect vqmod installation.
Thanks in advance for any help.
Looks like you have access directly to your server (localhost - WAMP server), I suggest to follow the official instructions from github.com (https://github.com/vqmod/vqmod/wiki/Installing-vQmod-on-OpenCart) or try to follow my instructions below
First, you need to uninstall the one that you did, just navigate to /admin/controller/extension/ => Delete (backup first) installer.php and modification.php => Rename installer.php.original to installer.php and rename modification.php.original to modification.php
Second, to install vQmod for OpenCart 2:
Download v2.5.1-opencart.zip
Unzip it, inside you will find a folder named "vqmod"
FTP/Copy/Transfer "vqmod" folder to the root of your OpenCart installed folder (where you see: admin, catalog, image, system folders)
Make sure vqmod folder is writable (I guess you don't need to do this with WAMP server)
Then go to http://www.yoursite.com/vqmod/install - if you see a success message, then installation is done. If you see "index.php not writeable", then you need to set your root OpenCart index.php to writable. If you see "Administrator index.php not writeable", then make the "/Admin/index.php" to writable.
I believe for WAMP server (running under Windows), to make something writable = make sure that file don't have Read Only.
If you are not clear about something, just visit github page: https://github.com/vqmod/vqmod/wiki/Installing-vQmod-on-OpenCart
If you still have issue, post comments.

Resources