Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 482
  • Last Modified:

ASPExec - cannot write files or create process ?


 Hello - using ASPExec to try to execute a batch file
   
   in an ASP page.  But I cannot write a log file
 (Access denied) and I cannot kick off another job
 with a parameter (Cannot create process)

  IUSR_mymachine has ALL priveleges on the directory
  in question where my ASP page is

  I can execute simple DOS commands such as dir
  in my batch file, but that seems to be the limit.

  what else do I need to know ?
0
stevenmcheerful
Asked:
stevenmcheerful
  • 4
  • 3
  • 2
1 Solution
 
Michel SakrCommented:
you will need to give the iusr privilieges on where to create the files.. ASPexec has the option to run in an administrator account context.. go to serverobjects , I guess they have a tool for that..
0
 
fritz_the_blankCommented:
I think that the IWAM account needs to have priviledges in order to launch a process, and as Silvers5 indicates, the IUSR account needs to have change priviledges for reading, writing and deleting.

Fritz the Blank
0
 
Michel SakrCommented:
otherwise include aspexec.dll in an MTS or COM+ package this way:

Start the Component services..in the tree select computers.. mycomputer..com+ applications...right click on it--> new -> application.. now in the wizard click next and select an empty application -> name your package  leave it in server process and click next -> Select the user and enter an account with enough rights to fufill your com jobs (admin account for ex) -> Finish..

now in the tree expand the new package untill you see the component directory-> right click it -> select new component-> in the wizard click next.. you can either install a new component if it's not registred or install a registred one if you already registred your dll (you select the 2nd choice) -> Select your component from the list (internal name displayed) -> Finish..

and voila..


In MTS (IIS4)

Start MMC (Microsoft management console.. from IIS or MTS) -> Select in the tree Microsoft Transaction.. -> My computer ->right click packages installed -> new package -> click on create an empty package and name the package, next -> select this user and give an admin user for the package -> finish  , now we'll need to include your registered component in the package(dll).. Expand the newly created package in the tree and right click on components folder-> new component -> select import components that are already registered -> you'll get a list of registered components on that machine.. select your component to include by it's class name -> Finish  note that your activex dll should be set to run unattended while compiling..


0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
stevenmcheerfulAuthor Commented:

  hey - great posts from both of you.  Especially detailed instructions on creating a COM+
        app registration are greatly appreciated !

   some questions though (please bear with me I'm a newbie on IIS) :

   ASPExec - I couldn't locate any info on running ASPExec as admin account
            do you recall what was involved or if it did in fact require a different tool ?

   IWAM account - this does indeed look very to be very important.  I will research this
             but what else would I need to do for this account than to give it FULL priveleges
            in my ASP directory  ?  I've done that, and that didn't change the outcome  ...

   COM+ registration -  I do not have the admin password.  My user (i.e., my identity
           on our corporate network) does have full admin priveleges on this Win2K box,
           but my user is also a member of the corporate Domain, not the local box Domain.

           Does that matter - can I make myself the COM+ user , or to ask it another way,
         does the COM+ app user and passwd *have* to belong to the local box Domain ?

   sorry to drag this out guys, but I think that we're close    :)

   - steve
0
 
fritz_the_blankCommented:
I'll defer to Silvers5 on most of your questions--he is much better at this sort of thing than I am. A few things, though:

The IWAM account is what Microsoft uses to launch processes, so if you are going to start a process via a web application, chances are that you'll need to give IWAM the appropriate permissions.

Giving full permissions to IWAM on your ASP directory may not be what you need (it is kind of dangerous to do so anyway). The idea is to create a directory with the .exe's or .bat's or whatever it is that you are going to call from ASPExec and then give the IWAM account permissions for that directory. You might start by giving full control to test and then by backing off the permsissions to make them as tight as you can while still running the code.

Fritz the Blank
0
 
stevenmcheerfulAuthor Commented:

  hey - great posts from both of you.  Especially detailed instructions on creating a COM+
        app registration are greatly appreciated !

   some questions though (please bear with me I'm a newbie on IIS) :

   ASPExec - I couldn't locate any info on running ASPExec as admin account
            do you recall what was involved or if it did in fact require a different tool ?

   IWAM account - this does indeed look very to be very important.  I will research this
             but what else would I need to do for this account than to give it FULL priveleges
            in my ASP directory  ?  I've done that, and that didn't change the outcome  ...

   COM+ registration -  I do not have the admin password.  My user (i.e., my identity
           on our corporate network) does have full admin priveleges on this Win2K box,
           but my user is also a member of the corporate Domain, not the local box Domain.

           Does that matter - can I make myself the COM+ user , or to ask it another way,
         does the COM+ app user and passwd *have* to belong to the local box Domain ?

   sorry to drag this out guys, but I think that we're close    :)

   - steve
0
 
fritz_the_blankCommented:
Steve,

Did you mean to repost your last comment? Try using the reload question button rather than refreshing your page.

Fritz the Blank
0
 
stevenmcheerfulAuthor Commented:

  hey - great posts from both of you.  Especially detailed instructions on creating a COM+
        app registration are greatly appreciated !

   some questions though (please bear with me I'm a newbie on IIS) :

   ASPExec - I couldn't locate any info on running ASPExec as admin account
            do you recall what was involved or if it did in fact require a different tool ?

   IWAM account - this does indeed look very to be very important.  I will research this
             but what else would I need to do for this account than to give it FULL priveleges
            in my ASP directory  ?  I've done that, and that didn't change the outcome  ...

   COM+ registration -  I do not have the admin password.  My user (i.e., my identity
           on our corporate network) does have full admin priveleges on this Win2K box,
           but my user is also a member of the corporate Domain, not the local box Domain.

           Does that matter - can I make myself the COM+ user , or to ask it another way,
         does the COM+ app user and passwd *have* to belong to the local box Domain ?

   sorry to drag this out guys, but I think that we're close    :)

   - steve
0
 
stevenmcheerfulAuthor Commented:

 Silvers5 is right on the money about the COM+ package setup

 Now I can execute things - Thank-You very much.  That advice was great.

 I can now execute simple batch jobs that log stuff to file.

 But batch jobs that run a separate process, such as a .bat file that
 is just


 notepad.exe

 or any of my C++ executables simply hangs the browser.  For my C++
job (that works in a CGI context) I have to go into Task Mgr and delete the job.

Any idea what that might mean ?

thanks
 
- steve
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now