مرجع تخصصی برنامه نویسان

انجمن تخصصی برنامه نویسان فارسی زبان

کاربر سایت

rtr

عضویت از 1392/05/28

اجازه اجرا ی فایل exe در iis7

  • دوشنبه 27 اردیبهشت 1395
  • 13:52
تشکر میکنم

سلام دوستان چطوری میشه توی iis7 اجازه اجرا ی فایل exe  داد.

int exitCode1 = 1;
            using (var process1 = new Process())
            {

                string input = Server.MapPath("~" + ("/report/" + mm + "." + type_file));
                string output = Server.MapPath("~" + ("/report/" + mm + ".pdf"));
                process1.StartInfo.FileName = Server.MapPath("~" + ("/scripts/wordtopdf/wordpdf.exe"));
                process1.StartInfo.Arguments = string.Format("{0}", input + " " + output);
                //process1.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
                     process1.Start();
                process1.WaitForExit();
                exitCode1 = process1.ExitCode;

                if (exitCode1 == 0) type_file = "pdf";
                return exitCode1;


            }

 

پاسخ های این پرسش

تعداد پاسخ ها : 1 پاسخ
کاربر سایت

mahmoodof123

عضویت از 1395/02/13

  • پنجشنبه 3 تیر 1395
  • 00:24
سلام جواب شما اینجا ... Lack of permissions for IIS Users, such as the application pool user, or the Network service (in IIS6). x86 EXE running on x64 machine issues. Typical EXE failure issues such as missing dependencies. Original answer: You need to assign FullControl security permissions for the IIS AppPool\DefaultAppPool user, on the directory the EXE is located in. This is the user that is trying to run the process (assuming you are using the DefaultAppPool), and without the proper permissions, it is unable to do so. When you run the EXE manually, you are using the Windows logged in user. This is why you are able to lunch it manualy. The IIS uses the Application Pool user. To add permissions just do the following: Go to directory properties Security tab Edit.. -> Add the IIS AppPool\DefaultAppPool Check for it the FullControl
کاربرانی که از این پست تشکر کرده اند

هیچ کاربری تا کنون از این پست تشکر نکرده است

اگر نیاز به یک مشاور در زمینه طراحی سایت ، برنامه نویسی و بازاریابی الکترونیکی دارید

با ما تماس بگیرید تا در این مسیر همراهتان باشیم :)