CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2003
    Location
    Greece
    Posts
    533

    shell from aspx page to local EXE

    Hello

    On a web server i have an aspx page which calls an EXE, waits, gets the result and sends it back to the user through the browser.

    command_line= "lsrunas.exe /user:Administrator /password*** /domain:myPC /command:""d:\onair\tts_app\tts.exe /f:" & FileName & " " & Text & """ /runpath:""d:\onair\tts_app"""

    tts.exe produces an mp3 file which contains synthesized speech based on the given text. lsrunas.exe is the known utility to run the exe as another user.

    Shell( command_line, True )

    If i run the 'command_line' from the Start->Run menu (its win xp pro), then the EXE works ok.

    But when it runs through the aspx page and Shell, it produces an error and terminates. Sorry i cant recall the error code (something like 0x400...) but in a little search i did it has something to do with DLL initialization, the app cant start correctly.

    As i said, the 'command_line' (as given from me above) works ok using the start->run dialog.

    So i am pretty sure it has something to do with Rights. This service made from me a year ago, it worked then after lot of headaches, but now after a new windows installation i cant remember what i did to make it work.

    Can someone help?
    - Better live in the digital world -

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: shell from aspx page to local EXE

    I don't understand. If you're saying your webpage called a program outside of the domain, it wouldn't work. The source and destination would be in IIS settings
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Feb 2003
    Location
    Greece
    Posts
    533

    Re: shell from aspx page to local EXE

    No, the EXE is inside the domain, the folder 'd:\onair' is declared as 'wwwroot'.

    A year ago as i said i managed to make it run, but with that new windows installation and iis , some of the settings lost.

    Can you tell me how to tell my aspx application that it can run everything as Administrator and not as a simple aspnet user? Where to change this?

    Thanks.
    - Better live in the digital world -

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: shell from aspx page to local EXE

    Not sure, but not likely. This might be an issue:
    Code:
    /domain:myPC
    Or, your IsRunAs.exe. Never heard of it, but there are other options that could possibly work.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Feb 2003
    Location
    Greece
    Posts
    533

    Re: shell from aspx page to local EXE

    if i copy-paste the 'lsrunas.exe.........tts.exe......" to the Start->Run and click OK, the command line runs successfully.
    - Better live in the digital world -

  6. #6
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: shell from aspx page to local EXE

    Look for Elevate.vbs
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  7. #7
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: shell from aspx page to local EXE

    Also look into the permissions of the folder holding the Application...

    Specifically the Execute permission for IIS_USER ...
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured