Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling COM from ASP, permissions problem
Message
 
To
06/02/2003 06:31:13
General information
Forum:
Microsoft IIS Server
Category:
Other
Miscellaneous
Thread ID:
00749767
Message ID:
00750034
Views:
22
I use cacls on all directories and files in the SetUp program for the COM server. Works great all of the time. here's some sample code:
* do cacls.cmd for read/write access 
	
IF ! EMPTY(lcCompName)
* create a temp batch file
*data dir
STRTOFILE([cacls "]+lcPath1+[" /E /G IUSR_]+lcCompName+[:W] + CHR(13)+CHR(10),THIS.cAppStartPath+"temp.cmd",.T.)
STRTOFILE([cacls "]+lcPath1+[" /E /G IWAM_]+lcCompName+[:W] + CHR(13)+CHR(10),THIS.cAppStartPath+"temp.cmd",.T.)
STRTOFILE([cacls "]+lcPath1+[" /E /G IUSR_]+lcCompName+[:R] + CHR(13)+CHR(10),THIS.cAppStartPath+"temp.cmd",.T.)
STRTOFILE([cacls "]+lcPath1+[" /E /G IWAM_]+lcCompName+[:R] + CHR(13)+CHR(10),THIS.cAppStartPath+"temp.cmd",.T.)
*error log dir
STRTOFILE([cacls "]+lcPath2+[" /E /G IUSR_]+lcCompName+[:W] + CHR(13)+CHR(10),THIS.cAppStartPath+"temp.cmd",.T.)
STRTOFILE([cacls "]+lcPath2+[" /E /G IWAM_]+lcCompName+[:W] + CHR(13)+CHR(10),THIS.cAppStartPath+"temp.cmd",.T.)
*app temp dir
STRTOFILE([cacls "]+lcPath3+[" /E /G IUSR_]+lcCompName+[:W] + CHR(13)+CHR(10),THIS.cAppStartPath+"temp.cmd",.T.)
STRTOFILE([cacls "]+lcPath3+[" /E /G IWAM_]+lcCompName+[:W] + CHR(13)+CHR(10),THIS.cAppStartPath+"temp.cmd",.T.)
*general temp dir
STRTOFILE([cacls "]+lcPath4+[" /E /G IUSR_]+lcCompName+[:W] + CHR(13)+CHR(10),THIS.cAppStartPath+"temp.cmd",.T.)
STRTOFILE([cacls "]+lcPath4+[" /E /G IWAM_]+lcCompName+[:W] + CHR(13)+CHR(10),THIS.cAppStartPath+"temp.cmd",.T.)
*individual data files
FOR lnI = 1 TO lnFileCount
 STRTOFILE([cacls "]+lcPath1+[\]+laDataFiles(lnI,1)+[" /E /G IUSR_] +lcCompName+[:W] + CHR(13)+CHR(10),THIS.cAppStartPath+"temp.cmd",.T.)
 STRTOFILE([cacls "]+lcPath1+[\]+laDataFiles(lnI,1)+[" /E /G IWAM_]+lcCompName+[:W] + CHR(13)+CHR(10),THIS.cAppStartPath+"temp.cmd",.T.)
 STRTOFILE([cacls "]+lcPath1+[\]+laDataFiles(lnI,1)+[" /E /G IUSR_]+lcCompName+[:R] + CHR(13)+CHR(10),THIS.cAppStartPath+"temp.cmd",.T.)
 STRTOFILE([cacls "]+lcPath1+[\]+laDataFiles(lnI,1)+[" /E /G IWAM_]+lcCompName+[:R] + CHR(13)+CHR(10),THIS.cAppStartPath+"temp.cmd",.T.)
ENDFOR
>Hi
>
>I have an ASP that calls a method in a COM, but unfortunately the COM errors as it can only read the tables it is trying to write to.
>
>How can I, with IIS5.0, ensure that the COM has R/W access to a certain directory/files, that's if it even is an IIS problem.
>
>Thanks
>Kev
Previous
Reply
Map
View

Click here to load this message in the networking platform