Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Foxisapi
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00621529
Message ID:
00709142
Views:
30
Hi Terry,

>CoCreateInstance failed with err code 80070005: Access is denied.

Configuring security FOXISAPI is really a hassle... *g* OK, let's start:

1) DCOMCNFG

- On the security tab you have to give the IUSR_ and IWAM_ account access and launch permissions
- On the identity tab you need to specify a user that fulfills the following conditions:
a) Has all required access permission needed to run the application
b) Has got the "Run as batch job" priviledge if you don't choose interactive or launching user.
c) Must not have the "Deny run as batch job" setting on either the account, or the group.

2) File permissions
- IUSR_ or IWAM_ need read/write/create access to the scripts directory in which the FOXISAPI DLL is located
- The identity of the COM server needs read/write access to the root of the drive which contains the temporary directory


Testing the COM server: Open a DOS prompt and enter

RUNAS /User:name "CMD.EXE"

Replace "name" with the name of the user that you specified on the identity tab in DCOMCNFG. You are prompted to enter the password. When the new command prompt appears, create a small VBS file that contains the lines:

SET oServer=CreateObject("yourserver.yourclass")
oServer.YourMethod

Then enter

WSCRIPT yourfile.vbs

If this code works flawlessly, the security configuration for the identity is probably OK. To test security settings for the IUSR_/IWAM_ account put the same code inside an ASP page in < % ERROR: ... % >'s and call this page from your browser. If it works OK, the launching and access permissions are OK. If you still have problems, it's most likely a file access security issue. Navigate to http://www.sysinternals.com and download FILEMON. Restart IIS and launch FileMon. Then try to access the page. On the result column, there should be one line giving an "ACCESS_DENIED" result. Determine the file name and enable proper security settings. Keep in mind that domain right assignments might override the local settings, even if you use a local user.

Christof
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform