Re: GetObject("IIS://LocalHost/W3SVC") -- Access denied when called from DLL

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Ben Strackany (infoNOSPAM_at_developmentnow.nospam.com)
Date: 11/30/04


Date: Tue, 30 Nov 2004 09:46:03 -0600

Are you calling this DLL from an ASP or ASP.NET page? If so, you will need
to run the DLL as an account with correct permissions. Let's say it's your
account. You't can just set the anonymous user of the page to your
account -- that won't pass enough information to authenticate against the
ADSI objects.

Instead, throw the ActiveX DLL into a COM+ Server Application, and set the
identity of that application to your account. Then it should execute with
the correct permissions.

-- 
Ben Strackany
www.developmentnow.com
<a href="http://www.developmentnow.com">dn</a>
"Tim Gorgs" <google@supertimmy.com> wrote in message
news:afa954a3.0411290539.137ee099@posting.google.com...
> Hi all,
>
> I have a problem which has been mentioned a couple of times in a
> similar way, but not exactly as what it appears to be like with my
> system.
>
> I have a Visual-Basic ActiveX-DLL, which is correctly registered on
> the system. But whenever I call the DLL-function which contains the
> "GetObject("IIS://...") line, I get the "access denied" error.
>
> When I debug the code in the Visual Basic IDE, everything works fine.
> When I try to run the code as a VBScript, no problems occur either.
>
> I really don't understand why it doesn't work within the DLL which
> runs under the same (mine) account as the VB IDE and the VBScript do.
> I could understand if it would work with all three methods or with
> none, but this is all a bit mixed up...
>
> Any help is very appreciated,
>
> thank you
>
> Tim


Relevant Pages

  • Re: IAS Athentication via ODBC
    ... IAS is compatible with any LDAP- ... authentication extension DLL that handles the authentication process. ... RADIUS extension DLL. ... account on your IAS server; configuring a connection request policy on your ...
    (microsoft.public.internet.radius)
  • Re: ASP.NET not executing interop functions
    ... I managed a work-around by giving the ASP.NET account increased security ... thanks for your help Rick. ... > access what ever the DLL needs to have access to. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Remotely creating accounts using ADSI & CDOEXM fails
    ... I have that COM+ app setup to run as an admin ... When I call the DLL from ASP I still get an Access Denied ... account it's configured to do in COM+ ... >>> creation part will work fine with alternate credentials). ...
    (microsoft.public.exchange.development)
  • Re: Permission denied on dll in ASP.NET
    ... (because this is anonymous IIS ... account would be used for logon and your application would run in that ... > I have an ASP.NET web application that calls a middle-tier dll. ... "Access to the registry key ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: win service and HKCU and SHGetFolderPath with CSIDL_APPDATA
    ... > Actually I have a LSP dll that is loaded by ... > the HKCU fails, and wasn't sure if this is a general rule for all ... The default account used for Services simply doens't ... >>I think this is because the user profile of the service account is not ...
    (microsoft.public.dotnet.languages.vc)