Re: 'Access is denied' accessing VB6 dll through RCW

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi,

Try to turn the security audit on in the Local Security Policy console, and then tune auditing of all access failures for the folder in which the COM DLL resides. Thus, if it is a file system permissions issue, you'll get a report in the Security event log.

But it theoretically might be a registry issue (because the information on COM objects in the system is stored right there). Try to configure the same level of audit for HKEY_CLASSES_ROOT (and all subkeys) with regedt32.exe.

--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]


"AussieBob" <rob@xxxxxxxxxxx> wrote in message news:1133237269.712497.82160@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

I'm having trouble using a RCW for a dll I created, I receive the
"Access is Denied" error message from my ASP.NET application.  In my
MCP 70-315 book I read that the directory containing the COM dll needs
to have write permissions for the User. -- I haven't seen this advice
anywhere on the 'net though, but I'm sure it's true...

I created a test COM dll in VB6 and a test ASP.NET application,
creating the RCW correctly.  When I use impersonation the web app works
correctly, calling the COM object.  When I turn impersonation off, I
get the access denied error.  I assume this is because my normal
windows account has read/write access to the COM dll directory.

I thought that if impersonation is not used, ASPNET user is used (as
this is the user I have to use in SQL Server to get the real app
working).  However, when I set ASPNET user to have write access to the
directory (I've tried setting write privelidges on both the directory
containing the RCW and the directory containing the COM dll) I still
get errors.  I've also done this for the SYSTEM user.

I've terminated the aspnet_wp.exe process to make sure nothing was
lingering...

I'm running .NET Framework 1.1 on IIS 5.1 and have Directory Security
for the application set to "Anoymous Access", "Allow IIS to control
password", and "Intergrated Windows Authentication".

Any help to resolve this issue (I've been stumbling around trying to
figure out what is wrong for a solid day now) would be greatly
appreciated

:AussieBob


.



Relevant Pages

  • Access is denied accessing VB6 dll through RCW
    ... I'm having trouble using a RCW for a dll I created, ... MCP 70-315 book I read that the directory containing the COM dll needs ... When I turn impersonation off, ... when I set ASPNET user to have write access to the ...
    (microsoft.public.dotnet.framework.interop)
  • Re: .NET Security
    ... Does this suggest that the programming attributes and/or code groups will be applicatable now? ... I "presumed" that from a sandboxing and security separation standpoint that installing our own code group would be the suggested method to isolated it. ... I'll written a .NET SDK API class library DLL wrapping our native WIN32 API and have written new clients, some VB6 ports to .NET as well, using the new .NET DLL. ... Dim ms As MEMORYSTATUSEX ...
    (microsoft.public.dotnet.security)
  • [NT] Sybase xp_freedll Buffer Overflow
    ... Beyond Security would like to welcome Tiscali World Online ... Xp_free accepts a single parameter that is the name of the DLL to free. ... memory buffer. ... This memory copy results in the stack and the stack pointer ...
    (Securiteam)
  • New Tools from Imperva ADC
    ... Imperva's Application Defense Center has released two new security ... This can be useful for identifying a dll that is related ... existance of an encryption key inside an executable file (based on Adi ... Shamir's "Playing hide and seek with encryption keys"). ...
    (Pen-Test)
  • Re: COM Component and Security
    ... it will affect the way ASPNET functions. ... Implementing Impersonation in an ASP.NET Application ... | Subject: Re: COM Component and Security ... Assuming you're reverting at the right time, ...
    (microsoft.public.dotnet.framework.aspnet.security)