我們最近從一個在線託管服務提供商遷移到本地服務器,我們目前正在嘗試使用Web服務建立一個.net網站並且遇到困難。在Windows Server 2003上配置Web服務
我們有兩個在IIS上運行的網站(在Windows Server 2003中) - 一個是我們從用戶那裏獲得輸入的實際網站,另一個是運行Web服務的地方,我們與數據庫交談/處理邏輯等...
在我們可以顯示主網站頁面,但此刻只要它訪問它收到以下404錯誤的Web服務:
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 1120: >[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://localhost:58605/Dev_GetVersion", RequestNamespace="http://localhost:58605", ResponseNamespace="http://localhost:58605", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] Line 1121: public string Dev_GetVersion() { Line 1122: object[] results = this.Invoke("Dev_GetVersion", new object[0]); Line 1123: return ((string)(results[0])); Line 1124: }
Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\b0534295\1f56ee4c\App_WebReferences.mjxicnrr.0.cs Line: 1122
Stack Trace:
[WebException: The request failed with HTTP status 404: Not Found.] System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +431289 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204 IPASWebServices.AccountManagementServices.Dev_GetVersion() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\b0534295\1f56ee4c\App_WebReferences.mjxicnrr.0.cs:1122 MasterPage.displayVersionDetails() in c:\www_ipas\MasterPage.master.cs:46 MasterPage.Page_Load(Object sender, EventArgs e) in c:\www_ipas\MasterPage.master.cs:28 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082
我看到它試圖訪問網絡服務器和然後使用方法(「http:// localhost:58605/Dev_GetVersion」),但它忽略了實際的Web服務名稱。 (它應該是「http:// localhost:58605/AccountManagementServices.asmx?op = Dev_GetVersion」)。
任何想法爲什麼這樣做?它在網絡虛擬主機和開發計算機上工作得很好,只是不在這個新的環境中。
有關設置的目的我運行的一切,「管理員」,所以這不應該(希望)是一個問題。 – Andrew 2010-09-30 04:28:14