WebService.Context プロパティ
アセンブリ: System.Web.Services (system.web.services.dll 内)

現在の要求に対する ASP.NET HttpContext。


SoapRpcMethodAttribute 属性または SoapDocumentMethodAttribute 属性が適用されており、OneWay プロパティが true に設定されている XML Web サービス メソッドでは、静的な Current プロパティを使用して HttpContext にアクセスしないでください。HttpContext にアクセスするには、XML Web サービスのメソッドを実装するクラスを WebService から派生し、Context プロパティにアクセスします。

Context プロパティを使用してサーバーでの要求時刻を取得する例を次に示します。
<%@ WebService Language="VB" Class="Util" %> Imports System Imports System.Web.Services Public Class Util Inherits WebService <WebMethod(Description := "Returns the time as stored on the Server", _ EnableSession := False)> _ Public Function Time() As String Return Context.Timestamp.TimeOfDay.ToString() End Function End Class

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からWebService.Context プロパティを検索する場合は、下記のリンクをクリックしてください。

- WebService.Context プロパティのページへのリンク