积极答复者
wms直播点访问控制问题

问题
-
我要让我的wms直播点不是被任何wmp都能访问。
我看了msdn上的这个例子,
不知道这个是不是可以实现我的需求。
using Microsoft.WindowsMediaServices.Interop
using System.Runtime.InteropServices;
// Declare variables.
WMSServer Server;
IWMSPlugin Plugin;
IWMSAdminAnonUser AdminAnonUser;
try
{
// Create a new WMSServer object.
Server = new WMSServerClass();
// Retrieve the IWMSPlugin object for the
// anonymous authentication plug-in.
Plugin = Server.Authenticators["WMS Anonymous User Authentication"];
// Retrieve the administrative interface for the
// anonymous authentication plug-in.
AdminAnonUser = (IWMSAdminAnonUser)Plugin.CustomInterface;
// Retrieve the user name.
string strUserName = AdminAnonUser.AnonymousUserName;
// Specify a new user name and password.
bool bPassword = AdminAnonUser.IsPasswordSet;
if (!bPassword)
AdminAnonUser.SetUserNamePassword("NewUserName", "NewPassword");
}
catch (COMException comExc) {
// TODO: Handle COM exceptions.
}
catch (Exception exc)
{
// TODO: Handle exceptions here.
}
finally
{
// TODO: Perform clean-up here.
}
答案
-
- 已标记为答案 BoberSongModerator 2010年9月3日 5:44
全部回复
-
我要让我的wms直播点不是被任何wmp都能访问。
我看了msdn上的这个例子,
不知道这个是不是可以实现我的需求。
using Microsoft.WindowsMediaServices.Interop
using System.Runtime.InteropServices;
// Declare variables.
WMSServer Server;
IWMSPlugin Plugin;
IWMSAdminAnonUser AdminAnonUser;
try
{
// Create a new WMSServer object.
Server = new WMSServerClass();
// Retrieve the IWMSPlugin object for the
// anonymous authentication plug-in.
Plugin = Server.Authenticators["WMS Anonymous User Authentication"];
// Retrieve the administrative interface for the
// anonymous authentication plug-in.
AdminAnonUser = (IWMSAdminAnonUser)Plugin.CustomInterface;
// Retrieve the user name.
string strUserName = AdminAnonUser.AnonymousUserName;
// Specify a new user name and password.
bool bPassword = AdminAnonUser.IsPasswordSet;
if (!bPassword)
AdminAnonUser.SetUserNamePassword("NewUserName", "NewPassword");
}
catch (COMException comExc) {
// TODO: Handle COM exceptions.
}
catch (Exception exc)
{
// TODO: Handle exceptions here.
}
finally
{
// TODO: Perform clean-up here.
} -
- 已标记为答案 BoberSongModerator 2010年9月3日 5:44