处理GET / POST请求时找不到404页面 [英] 404 page not found while handling GET/POST request

查看:1415
本文介绍了处理GET / POST请求时找不到404页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用前端Angular JS的跟踪器应用程序,并使用ASP.net Web api进行Get / POST请求处理。处理请求时发现404页面未找到错误



我尝试过:



面对很多与CORS相关的问题和经过大量的谷歌搜索...解决了这个问题,我的应用程序在localhost中完美运行...当我在服务器中部署到IIS时......它再次提出了CORS问题并且有解决了这个问题..但是现在我面临的Get页面找不到404页面。



请求URL:http://xxx.xx.xx .xx:55555 / api / CR /申请方法:获取状态代码:404未找到远程地址:15.85.199.199:8088



回复标题



Access-Control-Allow-Origin:*连接:Keep-Alive内容长度:1245内容类型:text / html日期:星期二,08十一月2016 07:44:23 GMT代理连接:保持活动服务器:Microsoft-IIS / 7.5请求标头视图源接受:application / json,text / plain,/ Accept-Encoding:gzip,deflate,sdch Accept-Language:en-US,en; q = 0.8 Cache-Control:max-age = 0主机:199.228.105.24:55555原产地: http://evil.com/代理连接:keep-alive用户代理:Mozilla / 5.0(Windows NT 6.3; Win64平台; x64)AppleWebKit / 537.36(KHTML,和Gecko一样)Chrome / 54.0.2840.71 Safari / 537.36

解决方案

我认为  服务器端问题如果您是使用 .net 作为后端,然后您需要添加您可以使用可视工作室的控制台窗口安装 


I'm working on a tracker application with front end Angular JS and using ASP.net Web api for Get/POST requests handling. Getting 404 page not found error while handling requests

What I have tried:

Faced lot of issues related to CORS and after lot of googling... solved that issue and my app is working perfectly in localhost... When I deployed to IIS in a server...it again raised CORS issue and have solved that too.. But now I'm facing 404 Page not found for Get/Post requests..

Request URL:http://xxx.xx.xx.xx:55555/api/CR/ Request Method:GET Status Code:404 Not Found Remote Address:15.85.199.199:8088

Response Headers

Access-Control-Allow-Origin:* Connection:Keep-Alive Content-Length:1245 Content-Type:text/html Date:Tue, 08 Nov 2016 07:44:23 GMT Proxy-Connection:Keep-Alive Server:Microsoft-IIS/7.5 Request Headers view source Accept:application/json, text/plain, / Accept-Encoding:gzip, deflate, sdch Accept-Language:en-US,en;q=0.8 Cache-Control:max-age=0 Host:199.228.105.24:55555 Origin:http://evil.com/ Proxy-Connection:keep-alive User-Agent:Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36

解决方案

I think this is server side issue if you are using .net as a back end then you need to add the cors library for that or you can install it using console window of visual studio.


这篇关于处理GET / POST请求时找不到404页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆