when I run youtube-dl.exe with c# process class on server, it returns below error in StandardOutput:
Traceback (most recent call last):
File "__main__.py", line 19, in <module>
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpc7h_sle1\build\youtube_dl\__init__.py", line 449, in main
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpc7h_sle1\build\youtube_dl\__init__.py", line 416, in _real_main
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpc7h_sle1\build\youtube_dl\YoutubeDL.py", line 367, in __init__
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpc7h_sle1\build\youtube_dl\YoutubeDL.py", line 2100, in _setup_opener
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpc7h_sle1\build\youtube_dl\utils.py", line 642, in make_HTTPS_handler
File "C:\Python\Python34\lib\ssl.py", line 439, in create_default_context
File "C:\Python\Python34\lib\ssl.py", line 390, in load_default_certs
File "C:\Python\Python34\lib\ssl.py", line 377, in _load_windows_store_certs
PermissionError: [WinError 5] Access is denied
What is these errors?I don't have these paths and files with these directories. And Here is my code
string ydlPath = Server.MapPath("/ydlPath/youtube-dl.exe");
string tempLocation = Server.MapPath("/ydlPath/");
System.IO.StreamReader errorreader;
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.ErrorDialog = false;
proc.StartInfo.RedirectStandardError = true;
proc.StartInfo.FileName = ydlPath ;
//proc.StartInfo.Arguments = "-F \"" + Url + "\"";
proc.StartInfo.WorkingDirectory = tempLocation;
proc.StartInfo.Arguments = "-f bestvideo[ext=mp4]+bestaudio[ext=m4a] \"" + Url + "\"";
proc.StartInfo.Verb = "runas";
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.CreateNoWindow = false;
proc.StartInfo.RedirectStandardOutput = true;
proc.Start();
errorreader = proc.StandardError;
string Output = proc.StandardOutput.ReadToEnd();
proc.WaitForExit();
proc.Close();
I used this on my local and it works fine. Also when I use youtube-dl.exe with cmd on server or on my local I don't have problem.
How can I solve this problem? Anyone can help me?