User Context

The user context contains name-value pairs that describe a client connected to the server. There is a unique context for each client, and it lasts only as long as the user is connected to the server. The following table identifies the context values defined by Windows Media Services.

Note

Note   The MMS protocol is mentioned in some of the descriptions in the following table. However, the MMS protocol is not supported in Windows Server 2008 operating systems.

Name

Value (data type)

Key

Description

WMS_USER_AGENT

String

1

Contains the name of the user agent for the client. You can use this to differentiate a player from a distribution connection. For more information about user agents, see Identifying a Cache Proxy Server.

WMS_USER_AUTHENTICATOR

IUnknown*

7

Contains an IUnknown pointer that you can use to retrieve a pointer to an IWMSAuthenticationContext interface used to authenticate a client. The IWMSAuthenticationContext interface implements an authentication plug-in. You can call the GetAndQueryIUnknownValue method on the IWMSContext interface to retrieve a pointer to IWMSAuthenticationContext.

WMS_USER_CACHE_CLIENT_COOKIE

String

45

Contains the cookie sent by the client to the server.

WMS_USER_CACHE_SERVER_COOKIE

String

46

Contains the value of the "Set-Cookie" headers sent by the upstream server to the proxy. The proxy server propagates this value downstream.

WMS_USER_CONTROL_PROTOCOL

String

6

Contains the protocol used to communicate with the client. This may be one of the following values:

WMS_MMS_PROTOCOL_NAME WMS_RTSP_PROTOCOL_NAME WMS_HTTP_PROTOCOL_NAME WMS_UNKNOWN_PROTOCOL_NAME

WMS_USER_GUID

String

2

Contains the client GUID identifying an instance of the client software. This GUID is normally generated on the client when installed, although users can explicitly conceal it for privacy.

WMS_USER_ID

long

8

Contains the client ID. This number is randomly generated by the server and assigned to a connected client. Each ID is unique.

WMS_USER_IP_ADDRESS

long

4

Contains the IP address of the client.

WMS_USER_IP_ADDRESS_STRING

String

5

Contains the IP address of the client in a dotted quad format.

WMS_USER_LINK_BANDWIDTH

long

20

Contains the link bandwidth specified when the client issued a play request.

WMS_USER_NAME

String

3

Contains the user name of the client. If the user is authenticated by using an anonymous authentication plug-in, the user name is WMUS_computername. Otherwise, this context value contains the name with which the user logged onto the network.

WMS_USER_PORT

long

12

Contains the number of the port on the client computer, in host byte order, to which the server is connected.

WMS_USER_PRESENTATION_CONTEXT

IUnknown

13

Contains an IUnknown pointer that you can use to retrieve a pointer to an IWMSContext interface containing the current presentation context for the client. You can call the GetAndQueryIUnknownValue method on the IWMSContext interface to retrieve a pointer to IWMSContext.

WMS_USER_PROXY_CLIENT_AGENT

String

47

Contains the user agent of the original client. When a server connects to an origin server, it provides the original client's user agent in the header. This value is saved so that the appropriate limits and actions can be applied, based upon whether the client is a player or a server.

WMS_USER_REFERER

String

26

Contains the referrer URL for the client.

WMS_USER_VIA_DOWNSTREAM_PROXIES

String

37

Contains a comma-delimited list of downstream proxy servers. This is updated for each RTSP and HTTP request received but is set only once for MMS. For RTSP and HTTP, the list contains all of the via headers of the downstream proxy servers through which the content passed. For more information about via headers, see Identifying a Cache Proxy Server.

WMS_USER_VIA_UPSTREAM_PROXIES

String

36

Contains a comma-delimited list of upstream proxy servers. This is updated for each RTSP and HTTP request received but is never set for MMS. For RTSP and HTTP, the list contains all of the via headers of the upstream proxy servers through which the content passed. For more information about via headers, see Identifying a Cache Proxy Server.

See Also (General)

See Also (Visual Basic .NET)

See Also (C#)

See Also (C++)