Access error using VB6 Com in .Net

G

Guest

Hey Guys
I think many of you might have already encountered this problem before. Here is the problem

I have a COM dll in VB6. I am using it in a .Net DLL(C#). Then I try to use the functions from the .Net DLL from within an ASP.Net page(C#). There are no compilation errors at this point

When I try to browse the web page, I get an "Access denied" error at the point in my .Net DLL where I try to instantiate the class object from the VB6 dll

I have already tried
(i) Giving permissions to the VB6 dll object.
(ii) The VB6 dll object also reads a file and writes to it. I have given all permissions to the folder and files for the system user for ASP.Net even though there is no mention of the files at this moment
(iii) I have double checked if I have imported the VB6 dll as COM and not as .Net

I have run out of ideas at this point. So please feel free to post anything that you might think of.

Thanks and appreciate it.
 
C

Chris Jackson

If you are running with the default settings, ASP.NET will be trying to
access that file using the account ASPNET, instead of IUSR_* as you would
from ASP. If you are using impersonation, or have modified your
machine.config, then it will be using whatever that configuration results
in. Make sure that this account has permissions on this object.

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Shell/UI
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

Roopam said:
Hey Guys,
I think many of you might have already encountered this problem before. Here is the problem:

I have a COM dll in VB6. I am using it in a .Net DLL(C#). Then I try to
use the functions from the .Net DLL from within an ASP.Net page(C#). There
are no compilation errors at this point.
When I try to browse the web page, I get an "Access denied" error at the
point in my .Net DLL where I try to instantiate the class object from the
VB6 dll.
I have already tried :
(i) Giving permissions to the VB6 dll object.
(ii) The VB6 dll object also reads a file and writes to it. I have given
all permissions to the folder and files for the system user for ASP.Net even
though there is no mention of the files at this moment.
(iii) I have double checked if I have imported the VB6 dll as COM and not as .Net.

I have run out of ideas at this point. So please feel free to post
anything that you might think of.
 

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

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top