Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Security issue with Assembly in GAC and ASP.NET run-time

Reply
Thread Tools

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

 
 
JamesMason
Guest
Posts: n/a
 
      11-24-2003
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.
 
Reply With Quote
 
 
 
 
Andrea D'Onofrio
Guest
Posts: n/a
 
      11-26-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> 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.



 
Reply With Quote
 
 
 
 
JamesMason
Guest
Posts: n/a
 
      12-01-2003
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" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) om...
> > 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can Web App and Winform both access an assembly in the GAC? Monty ASP .Net 14 06-22-2007 06:36 AM
Web Assembly in GAC, Page Inherits Strongly Named Assembly? john@johnwpowell.com ASP .Net 0 12-03-2005 01:31 PM
Referencing assembly from GAC using @assembly fails Brent ASP .Net 1 01-23-2004 08:23 PM
Deploy Assembly to GAC, and additional file system location Matt Gollob ASP .Net 0 11-18-2003 12:46 AM
how to reference a shared assembly from the GAC ? Joe Abou Jaoude ASP .Net 1 11-06-2003 10:08 PM



Advertisments