COM Interop - Access to the path XXX is denied.

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
--
 
W

Willy Denoyette [MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top