Re: Permission denied on dll in ASP.NET

From: Matjaz Ladava (matjaz_at__nospam_ladava.com)
Date: 06/17/03


Date: Tue, 17 Jun 2003 23:17:20 +0200


you are actualy using forms authentication. So setting identity imeprsonate=
true causes your app to runa as IUSR_..... (because this is anonymous IIS
account). identoty imeprsonate... must be set in web.config (it is not there
by default). If you would use authentication = windows, then your current
account would be used for logon and your application would run in that
context .
You are not seeing security tab probably because:
a) you are not administrator
b) your partition is formated as FAT32. Convert it to ntfs by running
convert c: /fs:ntfs

HTH

-- 
Regards
Matjaz Ladava, MCSE (NT4 & 2000)
matjaz@ladava.com
http://ladava.com
"Greg Pearson" <gregorypearson@yahoo.com> wrote in message
news:%23%23h5FXNNDHA.2092@TK2MSFTNGP12.phx.gbl...
> Hi.  I keep getting a permission denied error on a dll that is being
> accessed from an ASP.NET web application .
>
>
>
>
> SCENARIO:  *****************************************************
>
>
>
> I have an ASP.NET web application that calls a middle-tier dll.  This dll
is
> set up for transactions and is therefore registered in COM+.  The dll
itself
> calls a data-tier dll (that is not setup for transactions and is not
> registered in COM+).
>
>
> PROBLEM:  *****************************************************
>
>
>
>  1.  When testing the middle-tier & data-tier dlls from a VB.NET desktop
> application they work fine.
>
>
>
>  2.  However, when running the ASP.NET application, I get the following
> error:
>
>
>
>       "Access to the registry key
HKEY_CLASSES_ROOT\IBankAdventure.Security
> is denied."
>
>
>
>  3.  The error message then goes on to say:
>
>   "ASP.NET is not authorized to access the requested resource. Consider
> granting access rights to the resource to the ASP.NET request identity.
> ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5
or
> Network Service on IIS 6) that is used if the application is not
> impersonating. If the application is impersonating via <identity
> impersonate="true"/>, the identity will be the anonymous user (typically
> IUSR_MACHINENAME) or the authenticated request user."
>
>
>
>   "To grant ASP.NET write access to a file, right-click the file in
> Explorer, choose "Properties" and select the Security tab. Click "Add" to
> add the appropriate user or group. Highlight the ASP.NET account, and
check
> the boxes for the desired access."
>
>
>
>
> OBSERVATIONS:  *****************************************************
>
>
>
>  1.  The permission on the web application is IUSR_MACHINENAME (which it
> defaults to).
>
>
>  2.  In the Web.config file I have the following:
>
>
>
>       <authentication mode="Forms">
>            <forms loginUrl="Login.aspx"/>
>       </authentication>
>
>
>
>       <authorization>
>            <deny users="?"/>
>       </authorization>
>
>
>
>  3.  I created a "strong key" file & referenced it in the AssemblyInfo.vb
> file (dll compiles & registers fine in COM+) so I don't believe that is an
> issue
>
>
>  4.  I have tried both manual COM+ registration (regsvcs) & "lazy" COM+
> registration (VS.NET does it when app first runs)
>
>
>
>
> QUESTION:  *****************************************************
>
>
>
>  1.  Also, where is the  <identity impersonate="true"/>  to be found?
This
> is mentioned in the above error message.  It is not in the AssemblyInfo.vb
> file or Web.config file.  The web application I am trying to get to work
is
> straight from a WROX book and the only thing it says to do is add the
above
> mentioned <authentication/> & <authorization/> info to the Web.config file
> ...
>
>
>
>  2.  When I "right click the file in Explorer" (as it says to do above), I
> do NOT see a tab for  "Security".  Is this because I am using Windows XP
Pro
> instead of Windows 2000 Server?  If so, WHERE do I set this permission at?
>
>
>
>
>
> SOFTWARE:  *****************************************************
>
>
>
> Windows XP Professional
> IIS 5.1
> Visual Studio.NET 1.1
> SQL Server 2000
>
>
>
> (all service packs applied)
>
>
>
>
>
> ANY HELP WOULD BE GREATLY APPRECIATED.
>
>
>
> THANKS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


Relevant Pages

  • Re: Accessing 32 bit COM components in 64 bit IIS
    ... > It is a 32bit component and is writing its registration info to the Registry ... we will be introducing the ability to configure IIS to run under ... > the problem must be to do with how the dll is registered. ... >> your ASP page. ...
    (microsoft.public.inetserver.iis)
  • Re: IIS 6.0 missing random dll problem
    ... whether it's the process account or a configured one, has the permissions in that list. ... That will unregister the .Net Framework with IIS. ... This weird dll is different everytime i refresh page. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: CoCreateInstance return REGDB_E_CLASSNOTREG
    ... > I've registered this dll under win 2003 using regsrv32.exe. ... IClassFactory interface. ... look in the registry in HKEY_CLASSES_ROOT\\CLSID to verify that the classid ... is valid and that the account your are running from has proper permissions ...
    (microsoft.public.vc.mfc)
  • Re: Cannot step thru in COM objects source code
    ... IIS will load and cache the dll. ... try running IIS under your own account; I've had trouble debugging components when they're running under the "anonymous" account. ...
    (microsoft.public.vb.general.discussion)
  • Problem with performance of IDE devices
    ... index 0, dll tcpstk.dll, context 0x3f8a5c9 ... 0x801abbe8: FSREG: Mounted ROM portion of boot registry ... 0x8014abcc: FSREG: Invalid HKEY 0x00000000 ...
    (microsoft.public.windowsce.platbuilder)

Loading