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