-
Notifications
You must be signed in to change notification settings - Fork 652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileLoadException #59
Comments
What container are you using? ( structuremap?) http://twitter.com/andreasohlund
|
StructureMap v2.6.2 |
I've encountered this exact error as well--and I'm using Autofac. The trouble is that it cannot be consistently reproduced. I'm actually wondering if it's a bug in the .NET framework relative to locks during file loading... |
I have seen this problem with one assembly is x64 and rest is anyCpu. |
I am also experiencing this issue quite regularly. I have 12 handlers that I'm trying to start simultaneously, and about 40% of the time I get the Access is denied error. Any more thoughts on what could be causing this? |
We had troubles reproducing. Can you reliably reproduce the issue? Sent from my iPhone On 31 jan 2012, at 03:28, Dan Bishop
|
Yes, I can reproduce it quite regularly. It doesn't happen every time I start up a number of projects, but the problem is definitely worse as the number of projects increases above ~10. If I try to load ~20 handlers simultaneously (via F5 in Visual Studio), I will almost always get the error. This of course makes it difficult to do full integration testing on a developer machine. On average, the handlers that I'm starting have about 20 DLLs in their \bin\Debug directory, in case that is relevant. |
I also have that issue quite often. I think you should talk to the MEF team (Glenn Block); they have been fiddling alot with assembly loading. I'm quite sure that can be fixed with a combination of using separate app domains for introspection + retries. |
Our project has been plagued by this issue and we have had to literally put sleep statements within the batch files that start many endpoints. I can reproduce the scenario consistently. To do so, I created a solution with 40 projects that reference only log4net and NServiceBus assemblies and have nothing other than an app.Config file and a class that implements IConfigureThisEndpoint, AsA_Publisher, IWantCustomInitialization. In order to reproduce the scenario, I run a script that clears the contents of the global assembly download cache (gacutil.exe /cdl) and then executes a powershell script that runs NServiceBus.Host.Exe from within the various build directories in my solution. Note that I am not doing anything to intentionally put anything in the GAC. Any help would be IMMENSELY appreciated. |
Here is a project that replicates this issue - https://github.com/johnsimons/FileLoadException |
I nearly gave up! |
I'm curious how you recognized the shadow copy service. I watched in On Jul 9, 2012, at 10:07 PM, John Simons
|
It was a lucky shot ;) |
A FileLoadException (Could not load file or assembly. Access is denied.) is being thrown by the HostServiceLocator on line 25 (NServiceBus v2.5) when starting many endpoints simultaneously (Easy to repro with 20+ endpoints). This doesn't seem to be a problem with windows file system permissions or background indexers/virus scanners deadlocking the files.
The text was updated successfully, but these errors were encountered: