473,769 Members | 7,157 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

GAC but still get File or assembly name... was not found

Jim
Hi, I have an assembly and it's satellite in my GAC.

I have referenced the DLLs in my project (from the same location where I
added it to the GAC). CopyLocal is set false.

When I run the project I get our old friend:

Parser Error
Description: An error occurred during the parsing of a resource required to
service this request. Please review the following specific parse error
details and modify your source file appropriately.

Parser Error Message: File or assembly name ....., or one of its
dependencies, was not found.

So I obtained the fusion log (I've changed the names to protect the innocent):

*** Assembly Binder Log Entry (6/2/2005 @ 11:42:56 AM) ***

The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.

Assembly manager loaded from:
C:\WINDOWS\Micr osoft.NET\Frame work\v1.1.4322\ fusion.dll
Running under executable
C:\WINDOWS\Micr osoft.NET\Frame work\v1.1.4322\ aspnet_wp.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: DisplayName = myDLL
(Partial)
LOG: Appbase = file:///c:/inetpub/wwwroot/myApp
LOG: Initial PrivatePath = bin
LOG: Dynamic Base = C:\WINDOWS\Micr osoft.NET\Frame work\v1.1.4322\ Temporary
ASP.NET Files\myApp\247 702f1
LOG: Cache Base = C:\WINDOWS\Micr osoft.NET\Frame work\v1.1.4322\ Temporary
ASP.NET Files\myApp\247 702f1
LOG: AppName = b0b6a047
Calling assembly : (Unknown).
===

LOG: Processing DEVPATH.
LOG: DEVPATH is not set. Falling through to regular bind.
LOG: Policy not being applied to reference at this time (private, custom,
partial, or location-based assembly bind).
LOG: Post-policy reference: myDLL
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/myApp/247702f1/b0b6a047/myDLL.DLL.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/myApp/247702f1/b0b6a047/myDLL/myDLL.DLL.
LOG: Attempting download of new URL
file:///c:/inetpub/wwwroot/myApp/bin/myDLL.DLL.
LOG: Attempting download of new URL
file:///c:/inetpub/wwwroot/myApp/bin/myDLL/myDLL.DLL.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/myApp/247702f1/b0b6a047/myDLL.EXE.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/myApp/247702f1/b0b6a047/myDLL/myDLL.EXE.
LOG: Attempting download of new URL
file:///c:/inetpub/wwwroot/myApp/bin/myDLL.EXE.
LOG: Attempting download of new URL
file:///c:/inetpub/wwwroot/myApp/bin/myDLL/myDLL.EXE.
LOG: All probing URLs attempted and failed.

The only thing interesting about this is that it *should* say that it
checked the GAC, but it doesn't, why is this? Is my machine lazy? Is it by
design ;-?

If I set CopyLocal to true it works, but of course, this violates that oh so
lovely KB article http://support.microsoft.com/?id=324519, so I can't do that.
I have checked that the versions in the GAC
myDLLSatellite, Version=2.0.0.2 , Culture=neutral , PublicKeyToken= xxxx,
Custom=null
myDLL, Version=3.8.1.1 6824, Culture=neutral , PublicKeyToken= xxxx, Custom=null

match the references in the project.

I've restarted my machine, I've removed and readded to the GAC, I've tried
banging the side of my monitor - but none helps!

Can someone please give me an idea why this wouldn't be working?

Thanks in advance.

Jim
Nov 19 '05 #1
3 5252
Hi Jim,

Welcome to ASPNET newsgroup.
From your description, you have a strong-named assembly with its satellite
assemblies registered in the GAC. However, when you referenced those
assemblies in your ASP.NET project , and try running the applcation, you
got

=============== =====
Parser Error Message: File or assembly name ....., or one of its
dependencies, was not found.
=============== =====

error, yes?

Based on my experience, the problem you encountered is likely caused by the
ASP.NET runtime is trying to referencing the strong-named assemlby as
unstrong-named(partially ), we can also notice this from the following
period in the error info:

=== Pre-bind state information ===
LOG: DisplayName = myDLL
(Partial)
So as for partial named assembly, the runtime won't check the GAC. Then,
the reason why the runtime will treat your assembly as a private one maybe
caused by the <@Register ...> or <@Assembly > directive you put in the
aspx page. For example, when we drag a custom component/control onto the
asp.net page, we'll found that there occurs the following directive in aspx
template:

<%@ Register TagPrefix="cc1" Namespace="MYNa mespace"
Assembly="Assem blyName" %>

and the "AssemblyNa me" is the partial name(not fullname), so at runtime,
since the aspx is dynamic compiled, the asp.net runtime will reference the
"AssemblyNa me" as private assembly (not checking GAC) which cause the error
you met. So is your custom assembly also used as the behavior I mentioned
above , or is there any other @ directive in the aspx which reference your
assembly as Partial assembly name?

If so, you can try changing the "AssemblyNa me" with FullName(includ ing
culture, public keytoken.... ). In addition, we can also try putting the
following assembly referencing info in your web.config which will help
referecing certain assembly we want for all the aspx page(or other dynamic
compiled resources) in our web application.

<system.web>
.............
<compilation defaultLanguage ="c#" debug="true">
<assemblies>
<add assembly="Merri llLynch.Bank.Fr amework.Web, version=1.1.200 5.0,
publicKeyToken= 80a6f6408bd9315 8, culture=neutral " />
</assemblies>
</compilation>
..........
</system.web>

Please have a look to see whether the above things helps. If there're
anything unclear or different, please feel free to post here. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Nov 19 '05 #2
Jim
Wow, I hope you dont mind when people sing your praises, cos that's what I'm
about to do!!

Thanks very much!! Somebody give that man a promotion :)

Jim
Nov 19 '05 #3
You're welcome Jim,

I'm also glad that my suggestion has helped you.
Thanks again for choosing Microsoft!

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
20901
by: Peter Blum | last post by:
I have built an assembly (dll) from which I expect third parties to subclass. As a result, when my assembly has a version change, it will cause any third party assembly based on it to break unless I establish a Publisher Policy file. So I have that. I have built a Windows app for the same product. This app prompts the user for a path to a third party assembly that depends on my assembly. It opens the third party assembly (Assembly.Load)...
0
1945
by: karunakar | last post by:
Hi All I am not able to read the class name I want read the particular class name string path = System.Configuration.ConfigurationSettings.AppSettings; string className = path + ".User"; return (SCS.SR.IDAL.IUser) Assembly.Load(path).CreateInstance(className); ( This line iam getting Error)
3
12181
by: Michael Bøcker-Larsen | last post by:
Hi I'v been stuck on this problem for ages now. I have found that I'm not the only one with this problem, by looking through the different newsgroups. Hope you can help me! I know there is a lot of information, but if you need more (e.g. the code) please write michael@mblarsen.dk. The problem is this error messages (the code is build just fine; no errors):
2
2315
by: aallee83 | last post by:
i'm new in asp.net after develop my solution i copied it on the server where I want it to run but something cares... WHAT?!?! thank you in advance File or assembly name System, or one of its dependencies, was not found. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
1
5060
by: Olav Tollefsen | last post by:
I get the included error message when trying to run my ASP.NET application under Windows Server 2003 (with all updates installed). How can I troubleshoot this? Olav File or assembly name System.Xml, or one of its dependencies, was not found. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information
2
4064
by: Andy Fish | last post by:
Hi, I have a single-file aspx file (no codebehind). when I try to do this: <%@ Import Namespace="MySql.Data.MySqlClient" %> I get this: CS0246: The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?)
4
1623
by: Tiraman | last post by:
Hi, i have some problem to run my dll's (assemblies) on the production server. I have 3 dll's which use each other. Every thing is ok on my local machine where i developed them but when i upload them to the server and after signing them in to the GAC i m getting some errors.
2
1766
by: Andrew Jocelyn | last post by:
Hi I get this error when I change something in the web.config file. When I build the VS projects and load the first web page the application runs fine. If I then make a save the web.config file I then get this error when I refresh the browser. I have to restart IIS to fix the problem. I've included the error info but it all looks very cryptic to me. How do I find out what's really happening and how to fix it? Thanks
3
1737
by: Mukesh | last post by:
Thx Sloan for the solution. It is working properly under Full trust When i tried it under Medium trust it was giving error Parser Error Message: Required permissions cannot be acquired. :::::::::: Source Error:
0
9579
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9414
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10032
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9977
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8860
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6661
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5293
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5432
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3549
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.