ASP.Net app calling DLL with fOpen
Question
I have ASP.Net web app and my c# code calls into a custom COM DLL.
The DLL was written awhile back and uses fOpen. he fOpen calls return a NULL pointer. I am suspecting it is permissions, but I am having no luck in recolving the issue.
Can anyone give me any ideas of what to do? Can fOpen be used? Are there special permissions I need to set?
Any help would be greatly appreciated.
Thanks, Tony
Solution
The issue is most likely with the file it's actually trying to open. The file Asp.Net worker process likely doesn't have permission to access that file on the file system. You'll need to add access to the worker process and that should fix the issue.
This page details how to set permissions for Asp.Net 1.1. It should be fairly similar for later versions of Asp.Net
OTHER TIPS
Some things to check:
- The
trust
level of the ASP.Net app - Are you passing the correct path to the dll (mapping to the local file system vs web file system)?
- Does the account used to run the site have sufficient permissions to access the file?