Security issue with Assembly in GAC and ASP.NET run-time

Discussion in 'ASP .Net Security' started by JamesMason, Nov 24, 2003.

  1. JamesMason

    JamesMason Guest

    I have an Assembly I've built and installed in the Global Assembly
    Cache. I have an ASP.NET web application that is referencing this
    Assembly and when I try to run it I get a "Parser Error: File or
    assembly name LocalLib.Common, or one of its dependencies, was not
    found."

    The trace provides some interesting clues, it reads as follows:

    === Pre-bind state information ===
    LOG: DisplayName = LocalLib.Common
    (Partial)
    LOG: Appbase = file:///c:/inetpub/wwwroot/IPDHome
    LOG: Initial PrivatePath = bin
    Calling assembly : (Unknown).
    ===

    LOG: Policy not being applied to reference at this time (private,
    custom, partial, or location-based assembly bind).
    ----------------------------------------------------------------------------

    This appears to be a secuirty issue to me. The web application is
    running under the aspnet account and this account has read/write
    permissions on the \WINDOWS\Assembly folder.

    I've run the Assembly Binding Log Viewer (fuslogvw.exe) utility and it
    registers nothing when this app runs (and fails), there is no entry.

    Does anyone know why this might be happening?

    Best Regards,
    James.
    JamesMason, Nov 24, 2003
    #1
    1. Advertising

  2. If you are using this component from inline code (inside the aspx page), you
    MUST add the <add assembly="..." /> in the web.config file.

    HtH
    Andrea

    "JamesMason" <> wrote in message
    news:...
    > I have an Assembly I've built and installed in the Global Assembly
    > Cache. I have an ASP.NET web application that is referencing this
    > Assembly and when I try to run it I get a "Parser Error: File or
    > assembly name LocalLib.Common, or one of its dependencies, was not
    > found."
    >
    > The trace provides some interesting clues, it reads as follows:
    >
    > === Pre-bind state information ===
    > LOG: DisplayName = LocalLib.Common
    > (Partial)
    > LOG: Appbase = file:///c:/inetpub/wwwroot/IPDHome
    > LOG: Initial PrivatePath = bin
    > Calling assembly : (Unknown).
    > ===
    >
    > LOG: Policy not being applied to reference at this time (private,
    > custom, partial, or location-based assembly bind).
    > --------------------------------------------------------------------------

    --
    >
    > This appears to be a secuirty issue to me. The web application is
    > running under the aspnet account and this account has read/write
    > permissions on the \WINDOWS\Assembly folder.
    >
    > I've run the Assembly Binding Log Viewer (fuslogvw.exe) utility and it
    > registers nothing when this app runs (and fails), there is no entry.
    >
    > Does anyone know why this might be happening?
    >
    > Best Regards,
    > James.
    Andrea D'Onofrio, Nov 26, 2003
    #2
    1. Advertising

  3. JamesMason

    JamesMason Guest

    Hello Andrea,

    I tried adding this entry into my web.config:
    <configuration>
    <system.web>
    <compilation defaultLanguage="c#" debug="false">
    <assemblies>
    <add assembly="LocalLib.Common,
    Version=1.0.0.0,
    Culture=neutral,
    PublicKeyToken=cab7b38fd4d97938" />
    </assemblies>
    </compilation>
    ....

    It continues to fail, but this time with a "Parser Error Message: File
    or assembly name LocalLib.Common, or one of its dependencies, was not
    found."

    The trace on this error is identical to the one on my top post.

    One thing I've noticed that may be a problem, when I browse my Global
    Assembly Cache and locate LocalLib.Common, its CodeBase attribute
    reads:
    file:///c:/code/rangersec/locallib.common/bin/release/

    This is the path I ran gacutil -i from. But I've noticed none of the
    other Assemblies in the GAC have an entry for CodeBase most of them
    are blank. I don't know why this would be a problem as I've given the
    "Everyone" group FullControl on
    /code/rangersec/locallib.common/bin/release/ just to make sure this
    wasn't a NTFS security issue, but it continues to fail at run-time.




    "Andrea D'Onofrio" <> wrote in message news:<>...
    > If you are using this component from inline code (inside the aspx page), you
    > MUST add the <add assembly="..." /> in the web.config file.
    >
    > HtH
    > Andrea
    >
    > "JamesMason" <> wrote in message
    > news:...
    > > I have an Assembly I've built and installed in the Global Assembly
    > > Cache. I have an ASP.NET web application that is referencing this
    > > Assembly and when I try to run it I get a "Parser Error: File or
    > > assembly name LocalLib.Common, or one of its dependencies, was not
    > > found."
    > >
    > > The trace provides some interesting clues, it reads as follows:
    > >
    > > === Pre-bind state information ===
    > > LOG: DisplayName = LocalLib.Common
    > > (Partial)
    > > LOG: Appbase = file:///c:/inetpub/wwwroot/IPDHome
    > > LOG: Initial PrivatePath = bin
    > > Calling assembly : (Unknown).
    > > ===
    > >
    > > LOG: Policy not being applied to reference at this time (private,
    > > custom, partial, or location-based assembly bind).
    > > --------------------------------------------------------------------------

    > --
    > >
    > > This appears to be a secuirty issue to me. The web application is
    > > running under the aspnet account and this account has read/write
    > > permissions on the \WINDOWS\Assembly folder.
    > >
    > > I've run the Assembly Binding Log Viewer (fuslogvw.exe) utility and it
    > > registers nothing when this app runs (and fails), there is no entry.
    > >
    > > Does anyone know why this might be happening?
    > >
    > > Best Regards,
    > > James.
    JamesMason, Dec 1, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Spencer

    Re: GAC assembly with ASP.NET

    Kevin Spencer, Jul 1, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    385
    Kevin Spencer
    Jul 1, 2003
  2. jim

    Re: GAC assembly with ASP.NET

    jim, Jul 1, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    388
  3. Brent
    Replies:
    1
    Views:
    1,345
    Brent
    Jan 23, 2004
  4. =?Utf-8?B?TWFyaw==?=

    GAC assembly in VS.Net Add-Reference box?

    =?Utf-8?B?TWFyaw==?=, Feb 26, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    6,848
    Jim Cheshire [MSFT]
    Feb 26, 2004
  5. Replies:
    0
    Views:
    657
Loading...

Share This Page