asp.net中视频的缩略图

mis*_*hap 3 c# asp.net video thumbnails

它从cmd开始,但调试时不会进入condiion,任何想法为什么请?在IIS中浏览该站点将返回异常: System.ComponentModel.Win32Exception:拒绝访问.

        string video;
        string thumb;

        video = System.Web.HttpContext.Current.Server.MapPath("Video/test.avi");
        thumb = System.Web.HttpContext.Current.Server.MapPath("Video/frame.jpg");

        Process proc = new Process
        {
            StartInfo = new ProcessStartInfo
            {
                FileName = System.Web.HttpContext.Current.Server.MapPath("Video/ffmpeg.exe"),
                Arguments = " -i " + video + " -ss 00:00:03 -vframes 1 -f image2 -vcodec mjpeg " + thumb,
                UseShellExecute = false,
                RedirectStandardOutput = true,
                CreateNoWindow = true
            }
        };

        proc.Start();
        while (!proc.StandardOutput.EndOfStream)
        {
            string line = proc.StandardOutput.ReadLine();
        }
Run Code Online (Sandbox Code Playgroud)

小智 6

这是因为IIS进程的用户安全上下文无权运行该应用程序.