我做的方法一個破發點,但它永遠不會去那裏並且如果粘貼在網頁瀏覽器的網址並回車,這就是我得到在Firebug:localhsot的DNS查找失敗。沒有這樣的主機被稱爲
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
?
什麼可能是錯了嗎?
END EDIT
我有一個WCF使用具有填充JSON服務創建(http://msdn.microsoft.com/en-us/library/cc716898(v=vs.90).aspx)
我有下面的代碼,我用來調用服務,並且這個代碼是在HTML頁面的同一個項目,我創建了wcf服務。
$("#btn").click(function (event) {
$.getJSON('http://localhsot:2344/Service1.svc/GetCurrentUser?method=?', { },
function (data) {
debugger
alert(data);
});
//return false;
});
收到此錯誤:
爲localhsot DNS查找失敗。沒有這樣的主機被稱爲
恩,也許嘗試** localhost **,不localhsot。 – 2011-03-04 15:39:09