1. The test form is only available for requests from the local machine
於web.config中加入
1: <configuration>
2: <system.web>
3: <webServices>
4: <protocols>
5: <add name="HttpGet"/>
6: <add name="HttpPost"/>
7: </protocols>
8: </webServices>
9: </system.web>
10: </configuration>
其原因為沒打開對外通道
參考網址 : The test form is only available for requests from the local machine
2.無法連結資料庫,找不到資料庫名稱,請先確認下述三項
1.打開組態管理員,確認TCPIP是否有開啟
2.確認防火牆的PORT是否有開放
3.確認資料庫是否有開啟對外連結
如以上都有確認過後還是不行,請參考此種作法
1. 在「SQL Server Configuration Manager」視窗,執行以下的選項:
在左邊窗格,點選「SQL Server 網路組態」。
點選「SQLEXPRESS 的通訊協定」。
在右邊的窗格,在「通訊協定名稱」方塊下,選擇「TCP/IP」。
滑鼠右鍵,選擇「內容」。
2. 在「TCP/IP 內容」視窗,執行以下的選項:
點選「IP 位址」頁面。
在「IPALL」區域,清空「TCP 動態通訊埠」方塊。
在「TCP 通訊埠」方塊,填入指定的通訊埠編號。
理論上應該就可以了....
參考網址 : http://sharedderrick.blogspot.com/2009/05/sql-server-2008-express-enable-remote.html
3.服務中呼叫cmd.exe不鳥我一案
請用程式建立批次檔再去呼叫即可。
參考網址 : 如何叫用Dos Command的Net指令 (請看4F)