|
Subject:
|
ASPExec does not work!!!
|
|
Posted By:
|
planeswalk
|
Post Date:
|
6/9/2003 4:06:33 AM
|
Hi all,
I am trying to use ASPExec to call the command-line utilities for IMail (IPSwitch) but so far I am not having any luck. The utilities work great even when called through a batch file or a VBScript file, but not through an ASP file using the ASPExecute component. I am working with the following code:
<% Set Executor = Server.CreateObject("ASPExec.Execute") Executor.Application = "cmd" Executor.Parameters = "/C E:\IMail\AddDomain.exe -h domain.com -i VIRTUAL" Executor.ShowWindow = false Response.Write "Attempting to execute " & Executor.Application & "<br>" strResult = Executor.ExecuteDosApp Response.Write "Result : <pre>" & strResult & "</pre>" %>
It is always giving me Access denied errors when called through a browser. I also tried using Executor.Application = "E:\IMail\AddDomain.exe" but it doesn't work. Can anyone tell me if I am missing some crucial permissions for ASPExec to work through the web?? I am practically at my wit's end trying to figure this out and there is absolutely no help whatsoever from the ServerObjects.com site....
Thanks in advance!!! Marlon
|
|
Reply By:
|
Imar
|
Reply Date:
|
6/9/2003 6:15:15 AM
|
Hi Marlon,
Are you using Anonymous Access under IIS?? If so, the AddDomain executable is run under the contect of IUSR_MachineName or IWAM_MachineName depending on the settings of IIS. These users need to have permissions to execute the program.
When you use a batch file or a .vb script you are the user executing the program, so probably you have the correct permissions.
So, either change the account IIS runs under, or give the appropriate permissions to the IUSR account.
HtH,
Imar
|
|
Reply By:
|
planeswalk
|
Reply Date:
|
6/9/2003 6:14:18 PM
|
Hi Imar,
Thanks for getting back to me... I already have Modify permissions to the directory I'm working on as well as the Imail folder, WINNT, and system32, but still no luck. The wierd thing is that if I supply incomplete arguments to the utility, it gives me a string output which is exactly what it will give out through the command prompt, so I know that it is working. The problem is that if I supply the utility with the correct parameters, it doesn't seem to execute over the browser.
Any other ideas??
Marlon
quote: Originally posted by Imar
Hi Marlon,
Are you using Anonymous Access under IIS?? If so, the AddDomain executable is run under the contect of IUSR_MachineName or IWAM_MachineName depending on the settings of IIS. These users need to have permissions to execute the program.
When you use a batch file or a .vb script you are the user executing the program, so probably you have the correct permissions.
So, either change the account IIS runs under, or give the appropriate permissions to the IUSR account.
HtH,
Imar
|
|
Reply By:
|
Imar
|
Reply Date:
|
6/10/2003 1:27:29 AM
|
Hmmm, what exactly does AddDomain do?? Maybe you have set up the permissions to _run_ the program, but you don't have permissions to let the program do what it needs to do.... (access other files, read/change registry values etc).
Is there no documentation for AddDomain indicating the required permissions (i.e. you need to be an admin to run this program)???
Cheers,
Imar
|
|
Reply By:
|
planeswalk
|
Reply Date:
|
6/15/2003 6:00:36 PM
|
Hi,
Unfortunately, I can't find any other support for AddDomain and AddUser on the IMail docs. We did put up a question on the IMail forums but it seems no one also has a solution to it. The only other way that we think will work is to write the IMail registry entries manually so they can be read by the mail server.
I guess we'll just have to keep an eye out for what the IMail support has to say, though. Thanks so much for your help!!!!
Marlon
quote: Originally posted by Imar
Hmmm, what exactly does AddDomain do?? Maybe you have set up the permissions to _run_ the program, but you don't have permissions to let the program do what it needs to do.... (access other files, read/change registry values etc).
Is there no documentation for AddDomain indicating the required permissions (i.e. you need to be an admin to run this program)???
Cheers,
Imar
|
|
Reply By:
|
Imar
|
Reply Date:
|
6/16/2003 1:32:22 AM
|
Hi Marlon,
There is one more thing I can think of: move your code to a Visual Basic DLL which you should then host in a COM+ package. Then execute the AddDomain inside the VB DLL instead of in your ASP code.
This allows you to run the package under the context of a user with more permissions, required to make the changes.
Check out this post for more info about the COM+ package.
HtH
Imar
|
|
Reply By:
|
cmh
|
Reply Date:
|
1/21/2004 5:14:48 PM
|
I allow anonymous access on my dev site, but not on my production site. I am using aspexec.execute to copy pages from dev to production. Dev and production are physically located on the same server. IUSR and IWAM have not been automatically generated on this server. I get an access denied error when I try to run my batch file. I assume it is because I do not have anonymous access allowed on my production site. How do I get this to work if I am allowing anonymous access on the server site I am copying from , but not on the server site that I am copying this to? Thanks for any help.
quote: Originally posted by Imar
Hi Marlon,
Are you using Anonymous Access under IIS?? If so, the AddDomain executable is run under the contect of IUSR_MachineName or IWAM_MachineName depending on the settings of IIS. These users need to have permissions to execute the program.
When you use a batch file or a .vb script you are the user executing the program, so probably you have the correct permissions.
So, either change the account IIS runs under, or give the appropriate permissions to the IUSR account.
HtH,
Imar
|
|
Reply By:
|
mandrutza
|
Reply Date:
|
1/28/2004 6:33:35 AM
|
Did u succeed in solving your problem ?
|