Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Web Service引用問題:404 Not Found,懇請賜教~Orz

132 views
Skip to first unread message

Vinny

unread,
Mar 5, 2006, 9:43:26 PM3/5/06
to
我有個關於WebService滿緊急的問題
我在Local端進行了以下步驟

1.撰寫 *.asmx
2.編譯 *.dll
3.放置 *.dll 在 bin 目錄下
4.點 工具列 Project/Add References 選取 *.dll
5.編輯 *.aspx 呼叫
6.瀏覽 IE 沒問題

但是......................
我用另外一台機器(機器A),要使用我本機的Web Service
我不知道該使用哪個方法才對,我使用了兩個方法:

方法一:Project / Web References
1.使用 Project / Web References / 輸入我本機*.asmx網址
2.撰寫 *.aspx 呼叫
3.結果在程式呼叫時,就出現未定義的錯誤訊息


方法二:Project / References
1.把我本機編譯好的 *.dll 放置(機器A)的bin目錄下
2.使用 Project / References / .NET 選取(機器A)的 *.dll
3.撰寫 *.aspx 呼叫
4.結果出現以下錯誤訊息

The request failed with HTTP status 404: Not Found.

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.Net.WebException: The request failed with HTTP
status 404: Not Found.

Source Error:


Line 36:
Line 37: Dim objAA As AA= New AA
Line 38: lblBB.Text = objAA.getCard("1")
Line 39:
Line 40: End Sub

小台

unread,
Mar 5, 2006, 10:10:27 PM3/5/06
to
web service是利用url的方式去呼叫回應
我懷疑你的[另一台]主機對該url無法辨識!!
你看一下你dll的source code中的url拿到主機來呼叫asmx是否成功

"Vinny" 來函:

0 new messages