您正在寻找的资源可能已被删除,名称已更改或暂时不可用 [英] The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable

查看:262
本文介绍了您正在寻找的资源可能已被删除,名称已更改或暂时不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我正在从事MVC项目,让我向我展示我的代码

Hello

I''m working on MVC Project Let me show u my code

<pre lang="cs">var responseText = $.ajax({
       type: "POST",
       url: "/Rate/GetPrices",
       async: false,
       dataType: "json"
   }).responseText;


var jsonResponse = JSON.parse(responseText,null);


在本地系统上运行正常,但是在IIS上发布时尝试运行不正常.
它返回


var jsonResponse = JSON.parse(responseText, null);


It is working fine on local system but when Publish it try it On IIS it is not working properly.
It returns

"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"/>\r\n<title>404 - File or directory not found.</title>\r\n<style type=\"text/css\">\r\n<!--\r\nbody{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}\r\nfieldset{padding:0 15px 10px 15px;} \r\nh1{font-size:2.4em;margin:0;color:#FFF;}\r\nh2{font-size:1.7em;margin:0;color:#CC0000;} \r\nh3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} \r\n#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:\"trebuchet MS\", Verdana, sans-serif;color:#FFF;\r\nbackground-color:#555555;}\r\n#content{margin:0 0 0 2%;position:relative;}\r\n.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}\r\n-->\r\n</style>\r\n</head>\r\n<body>\r\n<div id=\"header\"><h1>Server Error</h1></div>\r\n<div id=\"content\">\r\n <div class=\"content-container\"><fieldset>\r\n  <h2>404 - File or directory not found.</h2>\r\n  <h3>The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.</h3>\r\n </fieldset></div>\r\n</div>\r\n</body>\r\n</html>\r\n"




我正在搜索过去4个小时的表格,但找不到解决方法

所以请Plz帮帮我
谢谢




I am searching form last 4 hours but i don''t find a solution

so Plz help me
Thank You

推荐答案

.ajax({ 输入:"POST", url:"/Rate/GetPrices", 异步:错误, dataType:"json" }).responseText;
.ajax({ type: "POST", url: "/Rate/GetPrices", async: false, dataType: "json" }).responseText;


var jsonResponse = JSON.parse(responseText,null);


在本地系统上运行正常,但是在IIS上发布时尝试运行不正常.
它返回


var jsonResponse = JSON.parse(responseText, null);


It is working fine on local system but when Publish it try it On IIS it is not working properly.
It returns

"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"/>\r\n<title>404 - File or directory not found.</title>\r\n<style type=\"text/css\">\r\n<!--\r\nbody{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}\r\nfieldset{padding:0 15px 10px 15px;} \r\nh1{font-size:2.4em;margin:0;color:#FFF;}\r\nh2{font-size:1.7em;margin:0;color:#CC0000;} \r\nh3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} \r\n#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:\"trebuchet MS\", Verdana, sans-serif;color:#FFF;\r\nbackground-color:#555555;}\r\n#content{margin:0 0 0 2%;position:relative;}\r\n.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}\r\n-->\r\n</style>\r\n</head>\r\n<body>\r\n<div id=\"header\"><h1>Server Error</h1></div>\r\n<div id=\"content\">\r\n <div class=\"content-container\"><fieldset>\r\n  <h2>404 - File or directory not found.</h2>\r\n  <h3>The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.</h3>\r\n </fieldset></div>\r\n</div>\r\n</body>\r\n</html>\r\n"




我正在搜索过去4个小时的表格,但找不到解决方法

所以请Plz帮帮我
谢谢




I am searching form last 4 hours but i don''t find a solution

so Plz help me
Thank You


您的查询中有相对路径,您确定它在生产服务器/IIS服务器上的位置相同吗?
You have a relative path in your query, are you sure it is in the same place on the production server/IIS server ?


这篇关于您正在寻找的资源可能已被删除,名称已更改或暂时不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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