http-status-code-404

Phonegap Cordova Ajax requests 404 (Not Found) Error

天大地大妈咪最大 提交于 2019-11-27 18:05:35
My cordova version is 5.0.0 I am getting a 404 error for the all ajax request made when the app is deployed on the device. On the web browser, it works fine but same app when deployed on a device does not work. I tried adding following to solve the issue but it hasn't helped. Config.xml <access origin="*" /> AndriodManiest.xml <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> I also added following in my index.html file but it didn't

Returning 404 Error ASP.NET MVC 3

房东的猫 提交于 2019-11-27 18:00:25
I have tried the following 2 things to have a page return a 404 error: public ActionResult Index() { return new HttpStatusCodeResult(404); } public ActionResult NotFound() { return HttpNotFound(); } but both of them just render a blank page. How can I manually return a 404 error from within ASP.NET MVC 3? xTRUMANx If you inspect the response using fiddler, I believe you'll find that the blank page is in fact returning a 404 status code. The problem is no view is being rendered and thus the blank page. You could get an actual view to be displayed instead by adding a customErrors element to your

Django Static files 404

柔情痞子 提交于 2019-11-27 17:41:06
I can't get my static files to come up. I've tried various settings and directory configurations and so on, but they just turn up as 404s. I have debug_toolbar installed so know that STATIC_URL is reaching my request context. Directory structure showing /static (I have also placed the directory inside of the meals app folder, and users, just to try it out. /mealmate /mealmate /meals /static /css /bootstrap.min.css /templates /users Settings.py (a few important settings though I've experimented with a variety of other ones): MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media/') STATIC_URL = '

Why does HttpWebRequest throw an exception instead returning HttpStatusCode.NotFound?

ⅰ亾dé卋堺 提交于 2019-11-27 17:06:42
问题 I'm trying to verify the existence of a Url using HttpWebRequest. I found a few examples that do basically this: HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(Url); request.Method = "HEAD"; using (HttpWebResponse response = request.GetResponse() as HttpWebResponse) { return response.StatusCode; } However, if the url is indeed broken, it's not returning a response, it's instead throwing an exception. I modified my code to this: try { HttpWebRequest request = (HttpWebRequest

detect 404 error on page load

南楼画角 提交于 2019-11-27 16:33:14
问题 I am embedding a google map in my website and sometimes google responds with a 404 error. I know I should know this, but I can't remember and I cannot find it quickly. None of the other 404 iframe related questions on this site were ever answered. How do I check if there is a 404 response in javascript? I plan to call location.reload() when the response is 404. <iframe src="https://mapsengine.google.com/map/embed?mid=zGLD-nMIJQAg.k0gTyNlOPz_Q" width="640" height="480"></iframe> The error code

404 page not found - Go rendering css file

不打扰是莪最后的温柔 提交于 2019-11-27 15:52:27
I'm currently working in Go. I created a web server on my local machine. I followed the instruction on this page Rendering CSS in a Go Web Application but I'm still getting the 404 error that the program can't seem to find where my css file is. My directory is as follows. In src folder contains css/somefilename.css , src also contains server/server.go . The code inside my server.go file is as follows. http.Handle("/css/", http.StripPrefix("/css/", http.FileServer(http.Dir("css")))) When I go to localhost:8080/css/ I get 404 page not found. I'm also using templates to render the html code. The

Django custom handler404 shows 404 but gives header 200

喜欢而已 提交于 2019-11-27 15:07:23
问题 I made a custom handler404 for a authenticated Django website to avoid information leakage. def check_logged_in_404(request): """ Custom 404. Show friendly 404 when logged in and redirect to /login when not logged in. """ if request.user.is_authenticated(): return render_to_response('404.html') else: return HttpResponseRedirect('/login') Functionally it does exactly what I want. However the 404 return page has a status 200, which is correct code-wise. But this obviously needs to be a 404

Deploy asp.net mvc beta to iis 6 causing 404's

你离开我真会死。 提交于 2019-11-27 14:05:03
问题 I'm struggling to get around the 404 errors from asp.net mvc beta when deploying on IIS 6. I had this working in one of the previews by mapping .mvc in IIS but this no longer works. I've read Omar's post and several others on the web and tried their solutions but no luck so far. The home page opens without a problem on IIS 6 but others 404 and the site runs well on IIS 7. Has anybody deployed asp.net mvc beta to IIS 6 with success? If so, what adjustments did you need to make to the code and

Angular 2 Hosted on IIS: HTTP Error 404

耗尽温柔 提交于 2019-11-27 13:08:53
问题 I have simple app with one component that expects certain parameters from url. there is only one route in the application: const appRoutes: Routes = path: 'hero/:userId/:languageId',component: HeroWidgetComponent }]; In the Index.html, I have this in the header <base href="/"> I am using webpack and the application runs fine on development environment, when browsing the url: http://localhost:4000/hero/1/1 . However, when building the app for production and getting the distribution files, then

how to fix 404 warnings for images during karma unit testing

房东的猫 提交于 2019-11-27 11:37:46
I'm unit testing one of my directives (angularjs) using grunt/karma/phantomjs/jasmine. My tests run fine describe('bar foo', function () { beforeEach(inject(function ($rootScope, $compile) { elm = angular.element('<img bar-foo src="img1.png"/>'); scope = $rootScope.$new(); $compile(elm)(); scope.$digest(); })); .... }); but I do get these 404s WARN [web-server]: 404: /img1.png WARN [web-server]: 404: /img2.png ... Although they do nothing, they do add noise to the log output. Is there a way to fix this ? (without changing karma's logLevel of course, because I do want to see them) That is