COM Interop - Access to the path XXX is denied.

  • Thread starter Thread starter Matthias S.
  • Start date Start date
M

Matthias S.

hi there,

i have a small class library which accesses some text files
(read/write). the class library provides a COM interface, because it
will be used in good old asp pages. in my test (console) application
everything works fine. but once i use it (via CreateObject) on an asp
page, instanciation works fine but once we get into fileaccess business
an error occurs:

mscorlib (0x80070005)
Access to the path 'C:\test\locklist.txt' is denied.

is there a security issue i have to take care of? as mentioned, the
class library can access the very same files without any problems, when
i reference it from a console test application.

could anybody please shed some light. i'd really appreciate it.

/matthias
--
 
Matthias S. said:
hi there,

i have a small class library which accesses some text files
(read/write). the class library provides a COM interface, because it
will be used in good old asp pages. in my test (console) application
everything works fine. but once i use it (via CreateObject) on an asp
page, instanciation works fine but once we get into fileaccess business
an error occurs:

mscorlib (0x80070005)
Access to the path 'C:\test\locklist.txt' is denied.

is there a security issue i have to take care of? as mentioned, the
class library can access the very same files without any problems, when
i reference it from a console test application.

could anybody please shed some light. i'd really appreciate it.

/matthias



This has nothing to do with COM interop nor does it relate to C#, this is a
simply ASP security, the account your IIS/asp is running in has no access
privileges to this folder.

Willy.
 
Back
Top