FileNotFoundException

Jan 25, 2010 at 6:45 AM

Hi, I'm having some issues in my plugin structure with the help of MEF. I'm regularly getting the FileNotFound Exception on one of the dependencies of the plugins. the DLL that is not found is my Proxy generator to go to other WCF services. I'm using the plugin structure in a WCF Service and i currently serialized the complete call to check out what could be the problem. I'm still getting it. any ideas?

I'm using that same dependency in code and i never had any threading related (or any other) problems with it.

Exception: FileNotFoundException

Message:
System.IO.FileNotFoundExceptionCould not load file or assembly 'ET.ServiceRegistry.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
The system cannot find the file specified.


Jan 26, 2010 at 1:06 AM

what is the whole stacktrace? Why don't u attach the debugger and make it handle "unhandled exception" to find out?

Jan 26, 2010 at 6:14 AM

Hi natl,

stacktrace doesn't show very much. It shows the code that's inside one of the plugins, which is not creating the error if it's referenced and called straight away.

Stack trace:
at PreValidatePattern7.BusinessRuleMethod38(Pattern obj, Int16 projectId, ValidationResult validationResult) at PreValidatePattern7.Process(IEntity& entity, Int16 projectId, List`1 exceptionCodeSnippetIds, Boolean executeExceptions, ValidationResult& validationResult) at ET.Deep.Plugins.DynamicValidatorHost.Process(IEntity& entity, Int16 projectId, List`1 exceptionCodeSnippetIds, Boolean executeExceptions, ValidationResult& vr) at ET.Deap.BusinessLogic.BusinessLogic.Validate(IEntity objectToValidate, Int16 projectId, List`1 validationExceptionCodeSnippetIds, Boolean executeExceptions, ValidationResult& vr)

(class PreValidatePattern7, method BusinessRuleMethod38)

And I can't debug it because it won't pop up every time. We have 50 people working with one application which uses a WCF Service to validate business objects. there it will happen sometimes. The validate method is thread safe, i've locked it on every spot which could possibly use the plugins.

 

Jan 29, 2010 at 8:03 AM

I've just found out about the FusionLog property in the FileNotFoundException. Maybe someone can help me by looking at that log?

=== Pre-bind state information ===

LOG: User = ELITECH\cvessen
LOG: DisplayName = ET.ServiceRegistry.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (Fully-specified)LOG: Appbase = file:///C:/inetpub/wwwroot/ET3/BusinessLogic/

LOG: Initial PrivatePath = C:\inetpub\wwwroot\ET3\BusinessLogic\bin Calling assembly : 23, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.

=== LOG: This bind starts in LoadFrom load context.

WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
LOG: Using application configuration
file: C:\inetpub\wwwroot\ET3\BusinessLogic\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework\v2.0.50727\Aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
FileName: ET.ServiceRegistry.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null