Analytics

2011年1月18日 星期二

[WCF]解決 There was no endpoint listening at http://localhost:1104/MyService.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.


問題

There was no endpoint listening at http://localhost:1104/MyService.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
當在開發WCF服務的時候,出現此錯誤:
Capture
There was no endpoint listening at http://localhost:1104/MyService.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

解決方法

看詳細說明:
2
指出問題是無法連到remote server
但由於是處於開發階段,怎會有remote server呢?原因是出在ASP.NET的Development Server尚未啟動,所以處於開發時期的wcf service找不到http://localhost:1104/MyService.svc 這個port為1104的service
解決方式如下:
在MyServices.svc按下右鍵=>選擇使用瀏覽器檢視
Capture3
你就會看到ASP.NET Development Server自動啟動了
Capture4
如果錯誤一樣發生,請檢查一下WCF Service的config所設的<endpoint/>是否位置正確

沒有留言:

熱門文章