in

ASP.NET Weblogs

Jason Clark's Blog

Software, Hardware, whatever...

File or assembly name or one of its dependencies not found?

We've recently had a customer contact us about an obscure error having to do with a dependency/assembly not found.   It looks like it's a temp file produced by .NET during compilation and is for some reason not found afterwards or during.   I've dug around and found that there are a couple of solutions to this issue, neither of which worked for the client. One was to disable indexing services so that no read locks would be performed on the temp dir that the .net framework uses, and the other was to register the DLL's into the GAC.   Problem is that the DLL or assembly its talking about doesn't exist in the applicaiton it's a temp file.  Error is below, if anyone has any ideas I'm all ears.

ERROR

File or assembly name nwyqbbug, 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.

Exception Details: System.IO.FileNotFoundException: File or assembly name nwyqbbug, or one of its dependencies, was not found.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'nwyqbbug' could not be loaded.

=== Pre-bind state information ===
LOG: DisplayName = nwyqbbug, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///D:/wwwroot/Forums/Web/Forum
LOG: Initial PrivatePath = bin
Calling assembly : omgp_cyn, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.
===

LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: nwyqbbug, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/web_forum/235e9bde/1539afa3/nwyqbbug.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/web_forum/235e9bde/1539afa3/nwyqbbug/nwyqbbug.DLL.
 

 

Comments

 

Tyler said:

I've had this problem in two cases:
1) The indexing service is on. Try turning it off and see if the problem goes away. This is what your problem sounds like to me.
2) The context you are running under does not have write permissions to the $WINDOWSDIR$\TEMP directory. But since the temp dir doesn't appear anywhere in the trace, I would try the indexing service first.
July 21, 2005 11:14 AM
 

Jason Clark said:

Yeah they disabled indexing services on all servers.
July 21, 2005 11:37 AM
 

Geoff said:

I've been running into this more and more frequently lately. So far I have not found a valid fix. I've done everything from rebuilding the app project by project, removing the reference and adding it back in. Nothing seems to work 100% of the time, and I'm actually convinced none of it is doing any good. I had it go away once without doing anything but refreshing the page, and other times nothing short of a reboot would cause it to go away. I'd love to hear of someone who has actually found a resolution to this problem.
July 21, 2005 1:15 PM
 

cathal said:

it's an issue with the xmlserializer namespace. Theres some code to check for the required permissions @ http://www.hanselman.com/blog/BruteForceCheckToEnsureAccessToTheTEMPDirectoryInOrderToUseTheXmlSerializer.aspx , but essentially you have to grant read & write permissions to $WINDOWSDIR$\TEMP as xmlserializer creates temporary assemblies there when used.
July 21, 2005 3:25 PM
 

Visakh said:

Hi
I was facing this problem when creating a webform to consume an external web service. After a lot of debugging the issue found was as follows:

The WSDL of the WebService has xsd:integer instead of xsd:int and also some of the element names were in the form tablename.fieldname. I changed it to just the field name ie <element name="fieldname">. After updating the web reference, the webform could be invoked sucessfully.

Regards
Visakh
August 10, 2005 11:33 AM
 

nchuah said:

This could be a general issue with .net I have the similar error with my VB application.
August 18, 2005 5:02 AM
 

Ryan said:

I had and issue similar to this and it was solved by fixing the permissions on the C:\WINDOWS\Temp folder, as described by this link here:

support.smartertools.com/.../KBArticle.aspx

June 18, 2007 7:37 PM
 

FatBoy said:

Looking in task manager showed a large number of cmd.exe processes running (something to do with a dodgy scheduled task I think).  Rebooting solved both problems

August 16, 2007 1:25 PM
 

rupert said:

thanks - I've had the same problem with an ASP.net application and changing the permissions on the C:\windows\temp directory fixed the issue. Dodgy microsoft software strikes again!!

October 31, 2007 10:50 AM
 

Tony said:

We have a web app that gets this under certain circumstances.  Always related to write permissions. In my case its the IWam account.

February 7, 2008 7:31 PM
 

selim said:

Hey Guys and girls if any,

Have a look at this, it might help you. It solved my problem with: Exception Details: System.IO.FileNotFoundException: File or assembly name nwyqbbug, or one of its dependencies, was not found.

It listed as a Bug in microsoft's website.

The link:

support.microsoft.com/.../820126

February 22, 2008 5:02 PM
 

hari said:

Hey even i have got same issues..trying to serialize and deserialize a big xml ...

but finally could able to resolve it using the following tool.....

www.cybral.com/downloads.aspx a lot to the author of the tool...

May 16, 2008 3:25 PM
 

SkIp said:

You must give permission to the IIS user to the directory c:\windows\temp

Good Bye

July 16, 2008 12:00 PM
 

Bala said:

Selim's suggestion about MS' bug report and the resolution there fixed my problem !! Thanks Selim.

July 18, 2008 10:41 AM
 

renilative said:

Is it me or is it Microsoft....?

This File or Assmebly not found thingy is getting on my nerves

October 15, 2008 4:15 AM
 

Grady Werner said:

Correction to the smartertools KB link above about this error:

www.smartertools.com/.../troubleshooting-file-assembly-name-xxxxxxdll-one-its.aspx

January 14, 2009 12:17 PM
 

K.B.H said:

Hi

From your error either the file nwyqbbug.dll is a third party dll, you are using within your code or a class library dll you created and you are calling within your project. If one of the above, then generally to solve this is to copy the dll into the bin folder Appbase=file:///D:/wwwroot/Forums/Web/Forum/bin

June 30, 2009 11:04 AM
 

MB said:

The problem was the permissions on the Windows\temp directory.

December 29, 2010 4:26 PM
 

frx said:

I have the same problem but but in my case, i have 2 different projects that use the same dll file. one of them works fine the other is giving this exception. Both projects are on the same pc. HELP!!!

March 12, 2011 5:55 AM