Scan execute error RRS feed

  • Question

  •   Hi all,

    i am using following code to execute one exe for scan process.


    strPath = Server.MapPath("~/Scanimage/") + "WiaScriptSample.exe";


    while i am running this application in File system, it working fine. but when i run this application in IIS , it show ing following error.
    An unhandle exception ('Sysem.InvalidOperationException') occurred in WiaScriptSample.exe[4376]

    can any one plz give me the solution for this problem.

    Pon Kumar

    • Moved by nobugz Wednesday, June 18, 2008 11:10 AM Post to forums.iis.net
    Wednesday, June 18, 2008 9:25 AM


All replies

  • Hi Pon,

    The problem here I believe is security context in which new process is started. When you start this application in file system, it runs under your user rights.
    Under IIS applications by default run under limited system accounts with limited priviledges. Try to run your web application uder power user account and check if it works.

    Usually it is not good idea to launch processes from web application. I'd suggest you to create back-end standalone application with extended rights. In this case web application just pass control to this back-end application in order to start process.
    Vitaliy Liptchinsky
    Wednesday, June 18, 2008 9:54 AM
  • Hi Vitaliy,

    i have run the application under Power user priviledges. But the same error is occuring.

    what can i do?

    tell me how to creat back-end standalone application with extended rights? or send the sample application to ponkumarpandian@gmail.com

    Pon Kumar
    Wednesday, June 18, 2008 10:16 AM
  • Pon,

    Have you tried to create process from Windows Forms or Console application?

    Back-end stand alone application can be: Windows Forms/Console application, or Windows Service or COM+ application, that runs under power user account. Usually it is not good idea to provide ASP.NET account with extended rights to perform additional tasks due to secrutity issues.

    Then your web application can communicate back-end application via .NET Remoting over IPC.

    The program flow is following:
    client application ----http(s)----> web application -----IPC---->back-end application.

    Please, let me know if you need additional details
    Vitaliy Liptchinsky
    Wednesday, June 18, 2008 11:43 AM
  • Hi Vitaliy,

    Thanks for ur response.

    i have tried to start a process from Web form. that process is one windoe application exe. 

    i didn't use remoting via IPC concepts. please give me the additional details.

    Thanks in advance!

    Pon Kumar
    Wednesday, June 18, 2008 12:14 PM
  • This question was moved into the Off Topic forum. I can move it into a specific forum if you'd like.


    Ed Price (a.k.a User Ed), SQL Server Experience Program Manager (Blog, Twitter, Wiki)

    Thursday, May 10, 2012 7:40 AM