 |
| Classic ASP Components Discussions specific to components in ASP 3. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

June 9th, 2003, 04:06 AM
|
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
ASPExec does not work!!!
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
|
|

June 9th, 2003, 06:15 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

June 9th, 2003, 06:14 PM
|
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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:
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
|
|
|

June 10th, 2003, 01:27 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

June 15th, 2003, 06:00 PM
|
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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:
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
|
|
|

June 16th, 2003, 01:32 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

January 21st, 2004, 06:14 PM
|
|
Registered User
|
|
Join Date: Dec 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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:
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
|
|
|

January 28th, 2004, 07:33 AM
|
|
Registered User
|
|
Join Date: Jan 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Did u succeed in solving your problem ?
|
|
 |