Start VLC from asp.net webpage
I have the following code:
protected void VLC_Click(object sender, EventArgs e)
{
SecureString password = ConvertStringToSecureString("[password]");
开发者_运维问答
string domain = "";
Process.Start(@"C:\Program Files\VideoLAN\VLC\vlc.exe ", "[username]", password, domain);
}
private SecureString ConvertStringToSecureString(string s)
{
SecureString secString = new SecureString();
foreach (char c in s.ToCharArray())
{
secString.AppendChar(c);
}
return secString;
}
linked to a button on an aspx page running on IIS on my Vista machine. When I click the button in the browser, I can see the process start in task manager but shortly after the process terminates and no vlc window appears at any point.
Is there any way to have the button trigger vlc just as if I was clicking on the .exe in Windows?
I hope you don't expect VLC appearing on the client machine when you do a Process.Start
on the server in an ASP.NET application.
It should work if the user that runs asp.net is able to interact with the desktop. On windows services there is a setting one can check for this.
精彩评论