Answered by:
Could not load file or assembly

Question
-
Hello Can someone take a look at this and let me know what is the problem here...
Thanks,
===================
Event code: 3008
Event message: A configuration error has occurred.
Event time: 6/28/2013 9:22:31 PM
Event time (UTC): 6/29/2013 2:22:31 AM
Event ID: ad425ad2d02c42e3b81c608f52772e93
Event sequence: 8135
Event occurrence: 3
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/2/ROOT-1-130169458045643387
Trust level: FullApplication Virtual Path: /
Application Path: D:\Program Files\Microsoft Dynamics CRM\CRMWeb\
Machine name: XXXXXX
Process information:
Process ID: 568
Process name: w3wp.exe
Account name: USA\XXXXXn
Exception information:
Exception type: ConfigurationErrorsException
Exception message: Could not load file or assembly 'Common.BO, Version=0.0.0.0, Culture=neutral, PublicKeyToken=bc8433c638c2f6d0' or one of its dependencies. The system cannot find the file specified. (D:\Program Files\Microsoft Dynamics CRM\CRMWeb\isv\custom\web.config line 18)
at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)
at System.Web.Configuration.AssemblyInfo.get_AssemblyInternal()
at System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig)
at System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors)
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Could not load file or assembly 'Common.BO, Version=0.0.0.0, Culture=neutral, PublicKeyToken=bc8433c638c2f6d0' or one of its dependencies. The system cannot find the file specified.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)
Request information:
Request URL: http://localhost:5555/ISV/Custom/ContractDetails.aspx
Request path: /ISV/Custom/ContractDetails.aspx
User host address: 127.0.0.1
User: USA\XXXX
Is authenticated: True
Authentication Type: Negotiate
Thread account name: USA\XXXXX
Thread information:
Thread ID: 24
Thread account name: USA\XXXX
Is impersonating: True
Stack trace: at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)
at System.Web.Configuration.AssemblyInfo.get_AssemblyInternal()
at System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig)
at System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors)
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Custom event details:
Red
- Edited by ColorRED Saturday, June 29, 2013 2:26 AM
Saturday, June 29, 2013 2:25 AM
Answers
-
Hello Guys,
Thank you very much for your help. After the changed the target platform from "Any CPU" to "X64" and deployed it this issue is resolved.
before that i registered it to GAC and also placed it D:\Program Files\Microsoft Dynamics CRM\CRMWeb\bin with no luck.
Thanks
Red
- Marked as answer by ColorRED Friday, July 5, 2013 5:27 PM
Friday, July 5, 2013 5:26 PM
All replies
-
Hi,
Is this a CRM4 ISV folder application - it seems there is a missing assembly - can you post what is in D:\Program Files\Microsoft Dynamics CRM\CRMWeb\isv\custom\web.config line 18
Scott Durow
Blog www.develop1.netFollow Me
Rockstar365
If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"Saturday, June 29, 2013 7:16 PMAnswerer -
If your assembly is a Plugin or Workflow extension that relies on an alternate assembly, named 'Common.BO', then it's failing because 'Common.BO' is not deployed to the server in a fashion that ASP.Net is recognizing. There are three methods for shipping supporting, 3rd-Party assemblies to a CRM deployment:
- Install the assembly into the Global Assembly Cache
- Deploy the assembly to the file system
- Package the assemblies together using ILMerge
In all instances, your supporting assembly must be signed, which doesn't appear to be an issue since the reference appears to contain its Public Key Token. Good luck!
Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com Please follow the forum guidelines when inquiring of the dedicated CRM community for assistance.
Sunday, June 30, 2013 7:57 AMModerator -
Hello Scott & Dave,
Thank you for your replies
* line 18 on web.config is "<add assembly="Common.BO, Version=0.0.0.0, Culture=neutral, PublicKeyToken=bc8433c638c2f6d0" />"
* installed the assembly on GAC (can't find it "C:\Windows\assembly" but is it added "C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Common.BO\v4.0_0.0.0.0__bc8433c638c2f6d0")
* assembly is also present in the bin folder of the application.
Still the same error.
I used fusionlogs and the log is as follows....
*** Assembly Binder Log Entry (6/28/2013 @ 9:19:11 PM) *** The operation failed. Bind result: hr = 0x80070002. The system cannot find the file specified. Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll Running under executable c:\windows\system32\inetsrv\w3wp.exe --- A detailed error log follows. === Pre-bind state information === LOG: User = USA\XXXX LOG: DisplayName = Common.BO, Version=0.0.0.0, Culture=neutral, PublicKeyToken=bc8433c638c2f6d0 (Fully-specified) LOG: Appbase = file:///D:/Program Files/Microsoft Dynamics CRM/CRMWeb/ LOG: Initial PrivatePath = D:\Program Files\Microsoft Dynamics CRM\CRMWeb\bin LOG: Dynamic Base = C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\8226853f LOG: Cache Base = C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\8226853f LOG: AppName = 1e6ff009 Calling assembly : (Unknown). === LOG: This bind starts in default load context. LOG: Using application configuration file: D:\Program Files\Microsoft Dynamics CRM\CRMWeb\web.config LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config. LOG: Machine configuration policy file redirect found: 0.0.0.0 redirected to 0.0.0.0. LOG: Post-policy reference: Common.BO, Version=0.0.0.0, Culture=neutral, PublicKeyToken=bc8433c638c2f6d0 LOG: GAC Lookup was unsuccessful. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/root/8226853f/1e6ff009/Common.BO.DLL. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/root/8226853f/1e6ff009/Common.BO/Common.BO.DLL. LOG: Attempting download of new URL file:///D:/Program Files/Microsoft Dynamics CRM/CRMWeb/bin/Common.BO.DLL. LOG: Attempting download of new URL file:///D:/Program Files/Microsoft Dynamics CRM/CRMWeb/bin/Common.BO/Common.BO.DLL. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/root/8226853f/1e6ff009/Common.BO.EXE. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/root/8226853f/1e6ff009/Common.BO/Common.BO.EXE. LOG: Attempting download of new URL file:///D:/Program Files/Microsoft Dynamics CRM/CRMWeb/bin/Common.BO.EXE. LOG: Attempting download of new URL file:///D:/Program Files/Microsoft Dynamics CRM/CRMWeb/bin/Common.BO/Common.BO.EXE. LOG: All probing URLs attempted and failed.
HELP !!!!
thanks
Red
Red
Monday, July 1, 2013 5:30 PM -
Put the assembly here:
D:\Program Files\Microsoft Dynamics CRM\CRMWeb\bin
At the end of your log, it's searching for the assembly, and not finding it in any location. If you're sure it's in one of those locations, double-check the read permissions to the file. It might have retained some of its properties when it was copied, and isn't allowed to be read by the IIS worker process.
Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com Please follow the forum guidelines when inquiring of the dedicated CRM community for assistance.
- Proposed as answer by DavidBerryMVP, Moderator Tuesday, July 2, 2013 2:56 PM
- Edited by DavidBerryMVP, Moderator Tuesday, July 2, 2013 2:57 PM revised for clarity
Tuesday, July 2, 2013 3:32 AMModerator -
It also looks like the assembly is not registered in the GAC properly. Assemblies build against .Net 3.5 or earlier will be in the GAC in %windir%\assembly, whereas those built against .Net 4.0 or higher will be in %windir%\Microsoft.Net
I'm not sure if it's an issue, but a version number of 0.0.0.0 makes me just a little nervous. I'd try any other version number than that
Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk
- Proposed as answer by DavidBerryMVP, Moderator Tuesday, July 2, 2013 2:56 PM
Tuesday, July 2, 2013 8:30 AMModerator -
Hello Guys,
Thank you very much for your help. After the changed the target platform from "Any CPU" to "X64" and deployed it this issue is resolved.
before that i registered it to GAC and also placed it D:\Program Files\Microsoft Dynamics CRM\CRMWeb\bin with no luck.
Thanks
Red
- Marked as answer by ColorRED Friday, July 5, 2013 5:27 PM
Friday, July 5, 2013 5:26 PM