DRM-X 6.0 鳩とオリーブの枝のロゴDRM-X 6.0ドキュメント
◎ 日本語

ASP.NET Framework 4.8 video DRM integration

Embed DRM-X 6.0 Universal Player in ASP.NET Framework Web Forms or existing IIS applications with authenticated server authorization and a tested async handler.

Markdown を表示動作サンプルUpdated 2026-09-21

再生が許可されるまでの流れ

視聴できるユーザーは、お客様のバックエンドが判断します。DRM-X は再生の認可情報を返し、プレーヤーはその情報を使って DRM ライセンスをリクエストします。

  1. 視聴者

    お客様のサービスにログインし、動画の再生をリクエストします。

  2. お客様のバックエンド

    購入履歴、サブスクリプション、その他の視聴権限を確認します。

  3. DRM-X

    選択した再生ルールを適用し、再生設定と認可情報を返します。

  4. プレーヤー

    受け取った認可情報を使い、再生に必要な DRM ライセンスをリクエストします。

バックエンドはアクセスを決定します。DRM-Xは署名されたポリシーを強制します。暗号化されたメディアとDRMのライセンスは、別の配送パスに従います。

Before you begin#

This integration targets ASP.NET Framework 4.8 and 4.8.1 on Windows and IIS, including Web Forms and existing ASP.NET applications. ASP.NET Core uses a separate sample. The Framework sample uses System.Web and does not require NuGet packages.

Prepare a published Content ID and server credentials with license-tokens:create permission. Keep Site ID, Site Key and Access Key on the server. Use HTTPS for deployment and the exact public origin of your application.

Download ASP.NET Framework source · Download complete Web integration kit

Run the Web Forms example#

Extract the source ZIP, open the folder containing Default.aspx and Web.config, then set the environment variables below in PowerShell before starting IIS Express. For the complete kit, the folder is examples/aspnet-framework. Open http://localhost:48087/Default.aspx on the same computer.

DRMX_LOCAL_DEMO=1 enables a loopback demonstration identity and authorizes only the configured VOD Content ID. Remove this switch before deployment, including deployment behind a local reverse proxy. Select the server policy in App_Code/DrmXPlayback.cs to match your encrypted package.

$env:DRMX_PLAYBACK_SITE_ID = "your-environment-uuid"
$env:DRMX_PLAYBACK_SITE_KEY = "drmx_your-client-id"
$env:DRMX_PLAYBACK_ACCESS_KEY = "drmx_secret_your-access-key"
$env:DRMX_CONTENT_ID = "your-published-content-id"
$env:DRMX_PUBLIC_ORIGIN = "http://localhost:48087"
$env:DRMX_LOCAL_DEMO = "1"
& "$env:ProgramFiles/IIS Express/iisexpress.exe" "/path:$PWD" /port:48087 /systray:false

Connect authentication and content access#

Add App_Code/DrmXPlayback.cs and Playback.ashx to a Web Site project, or compile the C# class into your Web Application/MVC project. Merge the relevant Web.config settings with your existing application. Keep your normal authentication configuration.

Set ApplicationServices.Authorize in Application_Start to query your current purchase, subscription or course records. It receives the authenticated user identifier, Content ID and content type. Reject missing, expired or revoked access. The default implementation does not authorize real customer accounts.

The handler reads HttpContext.User, preferring the NameIdentifier claim and otherwise Identity.Name. Use a stable and unique identifier. Configure DRMX_PUBLIC_ORIGIN and credentials in the IIS application-pool environment, then recycle the pool after changes.

Embed Universal Player#

Copy the qualified script tags and Web Component from Default.aspx into your page. Keep Playback.ashx on the same origin and use an application-relative path for virtual directories. The handler checks authentication, Origin, JSON size, exact content/type and current entitlement before contacting DRM-X.

Verification and deployment#

Run powershell -File tests/run.ps1. The 21 service checks execute on the .NET Framework runtime with a simulated DRM-X upstream; ASP.NET precompilation also passed. IIS Express HTTP startup was blocked by access denial on the test machine, so an IIS-hosted end-to-end playback test is still required on your Windows server.

Test authenticated and denied users, content substitution, access revocation, real encrypted playback and Stop. The Linux documentation server hosts this download and guide; it does not run ASP.NET Framework applications.

Integration center and downloads · ASP.NET Core integration · Universal Player Web guide · Universal Player SDK