実稼働 Web アプリにいくつかの機能強化を加えようとしています。WinXP IIS 5.1 開発マシンでかなりの単体テストを行った後、ローカルホストですべてが機能するので、開発用 PC で Visual Studio 2008 PUBLISH ダイアログを使用して、次のプロジェクトをステージング サーバーにプッシュしました。
- プライマリ Web アプリ
- 「プライマリ」Web サービス(ホームページがこの WS を呼び出そうとします)
- 「セカンダリ」Web サービス (ホームページはこの WS を呼び出さないため、まだ問題ではありません)
ブラウザにこれを入力して Web アプリのホームページを参照しようとすると、次のように表示されます: myUglyURL
Server Error in '/zVersion2' Application.
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:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
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
ProxyZipeeeService.WSZipeee.Zipeee.GetMessageByType(Int32 iMsgType) in C:\Documents and Settings\johna\My Documents\Visual Studio 2008\Projects\ProxyZipeeeService\ProxyZipeeeService\Web References\WSZipeee\Reference.vb:2168
Zipeee.frmZipeee.LoadMessage() in C:\Documents and Settings\johna\My Documents\Visual Studio 2008\Projects\Zipeee\frmZipeee.aspx.vb:43
Zipeee.frmZipeee.Page_Load(Object sender, EventArgs e) in C:\Documents and Settings\johna\My Documents\Visual Studio 2008\Projects\Zipeee\frmZipeee.aspx.vb:33
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
バージョン情報: Microsoft .NET Framework バージョン:2.0.50727.3607; ASP.NET バージョン:2.0.50727.3082
対応するソースコードの一部を次に示します。
Public wsZipeee As New ProxyZipeeeService.WSZipeee.Zipeee
Dim dsStandardMsg As DataSet
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
LoadMessage()
End If
End Sub
Private Sub LoadMessage()
Dim iCnt As Integer
Dim iValue As Integer
dsStandardMsg = wsZipeee.GetMessageByType(BizConstants.MsgType.Standard)
End Sub
ステージング サーバーで間違った設定をしたのではないかと思います。ステージング サーバーは、IIS 6.0 を実行する Win Server 2003 ServicePack 2 です。MOJITO というステージング サーバーでプライマリ サイトと 2 つの Web サービスを公開したとき、D ドライブにそれぞれの物理ディレクトリを作成しました。次に、INETMGR を使用して、次の仮想ディレクトリを構成しました。
- zVersion2
- zVersion2wsSQL
- zVersion2ws緊急事態
上記のすべては、私がセットアップしてzVersion2aspNet20という名前の新しいアプリケーション プールを使用するように構成されています。このマシン MOJITO の既定の Web サイトは、ASP.NET 1.1 を使用するように構成されており、IP アドレスは(All Unassigned)に設定されています。後者の 2 つの Web サービスの製品版は、MOJITO マシンで実行されます (それぞれ ZipeeService と EmergencyService という名前です)。
上記の Web サービスのステージング バージョン (それぞれ zVersion2wsSQL および zVersion2wsEmergency という名前) は、同じ IP アドレスを持つ同じ Web サーバー上に共存できますか?
zVersion2wsSQL Web サービスを個別に (INETMGR を右クリックして [参照] をクリックして) テストすると、次のスニペットのように期待どおりに動作する (つまり、Web サービスのすべてのメソッドを表示する) ことに注意してください。
- GetMessageByType MessageName="Get_x0020_Message_x0020_By_x0020_Type"
この Web メソッドをクリックしてテストすると、[テスト] ダイアログが表示されます (単純なデータ型を取り、ローカルホスト (つまり MOJITO) で呼び出しているため):
**Get Message By Type**
**Test**
To test the operation using the HTTP POST protocol, click the 'Invoke' button.
Parameter Value
iMsgType: _______ [INVOKE button]
SOAP 1.1 ....etc.
情報が多すぎたのでやめますが、このリクエストが「見つからない」という結果になる理由が理解できないので、誰かが私を助けてくれることを願っています. ありがとう。