Gets the current Web operation context.
Namespace:
System.ServiceModel.Web
Assembly:
System.ServiceModel.Web (in System.ServiceModel.Web.dll)
Visual Basic (Declaration)
Public Shared ReadOnly Property Current As WebOperationContext
Dim value As WebOperationContext
value = WebOperationContext.Current
public static WebOperationContext Current { get; }
public:
static property WebOperationContext^ Current {
WebOperationContext^ get ();
}
public static function get Current () : WebOperationContext
The following code shows how to access the current WebOperationContext instance.
Dim current As WebOperationContext = WebOperationContext.Current
Dim headers As WebHeaderCollection = current.IncomingRequest.Headers
For Each name As String In headers
Console.WriteLine(name + " " + headers.Get(name))
Next
WebOperationContext current = WebOperationContext.Current;
WebHeaderCollection headers = current.IncomingRequest.Headers;
foreach (string name in headers)
{
Console.WriteLine(name + " " + headers.Get(name));
}
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
.NET Framework
Supported in: 3.5
Reference