localhsot 的 DNS 查找失败。没有这样的主机是已知的

发布于 2024-10-20 11:42:05 字数 971 浏览 5 评论 0原文

我在该方法上做了一个断点,但它永远不会去那里,而且如果将网址粘贴到网络浏览器中并按 Enter 键,这就是我在 Firebug 中得到的:

ReadResponse() failed: The server did not return a response for this request.  

编辑:

确实这是拼写错误,在更正它之后,我仍然没有回复,在 FF 中我看到回复

GET GetCustomer?method=jsonp1299253547713
http://localhost:2344/service1.svc/GetCustomer?method=jsonp1299253547713

Aborted

localhost:2344

?

可能有什么问题?

结束编辑

我有一个使用带有填充的json创建的wcf服务(http://msdn.microsoft.com/en-us/library/cc716898(v=vs.90).aspx)

我有下面的代码是我用来调用服务的,该代码位于我创建 wcf 服务的同一项目内的 html 页面中。

$("#btn").click(function (event) {

            $.getJSON('http://localhsot:2344/Service1.svc/GetCurrentUser?method=?', { },
            function (data) {
                debugger
                alert(data);
            });
            //return false;
        });

收到此错误:

localhsot 的 DNS 查找失败。不知道这样的主机

i did a break point on the method but it never goes there and also if paste the url in the web browser and hit enter and this is what i get in Firebug:

ReadResponse() failed: The server did not return a response for this request.  

EDIT:

indeed that was typo, after correcting it and i still have no response, in FF i see the response

GET GetCustomer?method=jsonp1299253547713
http://localhost:2344/service1.svc/GetCustomer?method=jsonp1299253547713

Aborted

localhost:2344

?

what may be wrong ?

END EDIT

i have a created wcf services using json with padding (http://msdn.microsoft.com/en-us/library/cc716898(v=vs.90).aspx)

i have the code below that i am using to call the service, and this code is in html page withint th same project that i have created the wcf service.

$("#btn").click(function (event) {

            $.getJSON('http://localhsot:2344/Service1.svc/GetCurrentUser?method=?', { },
            function (data) {
                debugger
                alert(data);
            });
            //return false;
        });

getting this error:

DNS Lookup for localhsot failed. No such host is known

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

逐鹿 2024-10-27 11:42:05

尝试重命名:

localhsot =>本地主机

Try renaming:

localhsot => localhost

梦归所梦 2024-10-27 11:42:05

你把 localhost 拼写错了。查看您的网址并修复拼写错误。

You spelled localhost wrong. Look at your url and fix the spelling error.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文