Share via


How to Use the Cache Proxy Sample

To use the WMS SDK Sample C# Cache Proxy plug-in after it has been built and registered, you must enable it and configure the client to use your server as a proxy. To enable the plug-in from the Windows Media Services MMC snap-in:

  1. In the MMC console tree, click the name of the server that you want to administer.

  2. In the details pane, click the Properties tab, and then click Cache Proxy Management.

  3. Right-click the WMS SDK Sample C# Cache Proxy plug-in and click Enable.

  4. Click the Control Protocol category in the details pane, right click the control protocol plug-ins that clients can proxy through, and click Enable for each.

  5. If you are running Internet Information Services (IIS) on the cache proxy server and you enable the WMS HTTP Server Control Protocol plug-in, use the property page associated with the plug-in to specify a port number different than the one used by IIS. You can open the property page by double-clicking the plug-in name.

To configure Windows Media Player to use your server as a proxy:

  1. On the Tools menu, click Options.

  2. In the Options dialog box, click the Network tab.

  3. In the Proxy settings group box, click a protocol and then click Configure.

  4. Click Use the following proxy server, specify the name of the appropriate Windows Media server, enter a port number, and then click OK.

To test the sample cache proxy plug-in, it is also recommended that you disable the fast caching property on the origin server. This will prohibit Windows Media Player 9 Series from caching content in the temporary Internet files folder.

  1. In the MMC console tree, click the default on-demand publishing point.

  2. In the details pane, click the Properties tab, and then click the General category.

  3. Right-click the Enable Fast Cache option, and then click Disable.

The first time that you use a player to request content that is not cached, the plug-in proxies content from the origin server and also requests that the content be downloaded into the WMSCache folder. Content is saved under file names that start with test, such as test_001, test_002 and so on. After the content has been downloaded, subsequent requests play it from the local cache.

You can verify proxying operation by using the performance monitor on both the origin server and the cache proxy server:

  1. Click Start, click Run, enter perfmon, and then click OK.

  2. Click the Add icon to open the Add Counters dialog box.

  3. In Performance object, click Windows Media Services.

  4. Click Current Outgoing Distribution Connections and then click Add.

  5. Click Current Streaming Players and then click Add.

  6. Click the View Report icon to see the output in tabular format.

The first time that a client requests content, the performance monitor on the origin server will indicate that the cache proxy server has established connections for both proxying and downloading the content. For subsequent client requests, the performance monitor on the origin server will not indicate connections because the content is streamed from local storage on the cache proxy server instead of the origin server. The performance monitor on the cache proxy server will indicate the number of connected clients.

If you delete the cached content so that you can run the test again from the beginning, you must perform the following steps or the player will not be able to reconnect to the cache proxy server:

  1. Stop Windows Media Services.

  2. Delete the cacheproxysampledatabaseplugin.xml file from the %systemroot%\system32\windows media\server folder.

  3. Restart the Windows Media Services.

See Also

Concepts

C# Cache Proxy Plug-in Sample