http-status-code-404

Unable to download packages from a self hosted nuget server (404 error)

妖精的绣舞 提交于 2019-12-02 00:06:59
问题 I installed a self hosted Nuget server as described here. I am using Windows 2008 R2, IIS 7.5 and Nuget 1.7. From within VS I am able to see my self hosted packages in the package manager window, but when I try to install any of them, I am getting an error "The remote server returned an error: (404) Not Found". Help anyone? 回答1: please make sure in IIS to set the .nupkg extention mime type to application/zip. See also these discussion for more info: Issue #707, Discussion #246387 回答2: I hade

Browser language based 404 pages with mod_rewrite how to

核能气质少年 提交于 2019-12-01 23:44:47
问题 I am trying to generate language dependant 404 (also other errors) pages purely based on Apache mod_rewrite rules by evaluating the clients HTTP Accept-Language header. I've managed to show the correct pages (english default) with this rules: RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{HTTP:Accept-Language} ^es [NC] RewriteRule (.+) /esp/error404.php [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !

Unable to download packages from a self hosted nuget server (404 error)

浪尽此生 提交于 2019-12-01 22:13:12
I installed a self hosted Nuget server as described here . I am using Windows 2008 R2, IIS 7.5 and Nuget 1.7. From within VS I am able to see my self hosted packages in the package manager window, but when I try to install any of them, I am getting an error "The remote server returned an error: (404) Not Found". Help anyone? please make sure in IIS to set the .nupkg extention mime type to application/zip. See also these discussion for more info: Issue #707 , Discussion #246387 I hade to perform 3 actions in order to get this to work finally 1) Some of my packages has the extension ".symbols

ASP.NET MVC Custom Error Pages with Magical Unicorn

一个人想着一个人 提交于 2019-12-01 19:26:39
my question is regarding Pure.Kromes answer to this post . I tried implementing my pages' custom error messages using his method, yet there are some problems I can't quite explain. a) When I provoke a 404 Error by entering in invalid URL such as localhost:3001/NonexistantPage, it defaults to the ServerError() Action of my error controller even though it should go to NotFound(). Here is my ErrorController: public class ErrorController : Controller { public ActionResult NotFound() { Response.TrySkipIisCustomErrors = true; Response.StatusCode = (int)HttpStatusCode.NotFound; var viewModel = new

How to catch 404 WebException for WebClient.DownloadFileAsync

a 夏天 提交于 2019-12-01 19:12:14
问题 This code: try { _wcl.DownloadFile(url, currentFileName); } catch (WebException ex) { if (ex.Status == WebExceptionStatus.ProtocolError && ex.Response != null) if ((ex.Response as HttpWebResponse).StatusCode == HttpStatusCode.NotFound) Console.WriteLine("\r{0} not found. ", currentFileName); } downloads file and informs if 404 error occured. I decided to download files asynchronously: try { _wcl.DownloadFileAsync(new Uri(url), currentFileName); } catch (WebException ex) { if (ex.Status ==

Fallback for 404 images

感情迁移 提交于 2019-12-01 17:51:46
On a daily basis I automatically imported several XML-feeds (Tradetracker, Daisycon, etc.) for an affiliate site using PHP. The feeds contain products from all kinds of shops. Everything works like a charm, with exception of the images. The images in the feeds are simply hotlinked to an image of the provider. This works in most of the cases, however sometimes (due to various reasons) the image doesn't exist anymore, is hotlink protected, is changed, etc. etc. This results in "image not found" in the browser, which doesn't look good. I tried to solve this using htaccess, but for whatever reason

django tutorial: custom 404 and 500 views

自作多情 提交于 2019-12-01 17:33:10
Windows 7 Python 2.7.3 Django 1.5 python manage.py runserver I am following the tutorial as available at ' https://docs.djangoproject.com/en/1.5/intro/tutorial03/ ' I got as far as the 'Write a 404 (page not found) view' before things got wierd. I have tried to work out how to make a custom 404 view. However, I am not sure: A. Where exactly the custom 404.html file should reside. Should it be in my project directory tree or in my Django directory tree. My project directory tree looks like this, 1> mysite 2> - mysite 3> - polls 4> - templates 5> - polls 6> - templates 7> - admin Currently the

Fallback for 404 images

↘锁芯ラ 提交于 2019-12-01 17:31:07
问题 On a daily basis I automatically imported several XML-feeds (Tradetracker, Daisycon, etc.) for an affiliate site using PHP. The feeds contain products from all kinds of shops. Everything works like a charm, with exception of the images. The images in the feeds are simply hotlinked to an image of the provider. This works in most of the cases, however sometimes (due to various reasons) the image doesn't exist anymore, is hotlink protected, is changed, etc. etc. This results in "image not found"

Why doesn't apache show a 404 error when I send a 404 header with php?

橙三吉。 提交于 2019-12-01 16:53:24
问题 I have a header('HTTP/1.0 404 Not Found'); somewhere along the code but it doesn't redirect to the Apache's default 404 page for some reason. I have a Rewrite Rule on the .htaccess file that redirects every request to index.php. Could that be the problem? 回答1: The header is not what tells Apache to display it's 404 page. Rather, when Apache displays its 404 page, it sends a 404 header along with it. The header is meant to have meaning to the browser , not the server. Apache displays a 404

Why doesn't apache show a 404 error when I send a 404 header with php?

时光怂恿深爱的人放手 提交于 2019-12-01 16:48:41
I have a header('HTTP/1.0 404 Not Found'); somewhere along the code but it doesn't redirect to the Apache's default 404 page for some reason. I have a Rewrite Rule on the .htaccess file that redirects every request to index.php. Could that be the problem? The header is not what tells Apache to display it's 404 page. Rather, when Apache displays its 404 page, it sends a 404 header along with it. The header is meant to have meaning to the browser , not the server. Apache displays a 404 when it can't find the proper file to display. Since you're in a PHP script, Apache has already found a file it