Binding Microsoft.Web.DynamicData assembly at runtime failing - asp.net

I've got a project using DynamicData that was wrote by somebody else. Every time i try debbuging it, I get the message I've attached at the bottom
I've already tried deploying the DynamicData dll to GAC, and throwing it into the bin folder, chceking the assemblies full names, installing again VS SP1, and .NET Framework SP1, and chceking the logs in Fuslogvw.
I've run out of ideas at this point. Could anybody help me, or at least suggest a new direction of searching for the solution ? Thx in advance.
The error message I get :
=== Pre-bind state information ===
LOG: User = DOMAIN\user
LOG: DisplayName = Microsoft.Web.DynamicData
(Partial)
LOG: Appbase = file:///C:/AppBase/
LOG: Initial PrivatePath = C:/AppBase/bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:/AppBase/bin/web.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.

You might be able to use the AppDomain.AssemblyResolve event to learn more about the Assembly that's being requested. You can check that the version numbers and everything else match. If you have the dependency already loaded, then you can just return it from the event handler. I've included some sample code in this answer.

Related

Assembly manager - All probing URLs attempted and failed

I have a VirtualMerchant project which is dependent on SysAuto.Web.Payment project.
Both VirtualMerchant and the Web.Payment project, once built, are version 2.0.1
However, from the assembly binding log viewer, we can see that the assembly loader is looking for SysAuto.Web.Payment Version=2.0.0.0
I have spent hours trying to figure out why it is looking for version 2.0.0 instead of going with 2.0.1. Or alternatively, why would the (vs 2013 ide) build would do a version 2.0.1, instead of a 2.0.0.
How am I saying these numbers. I click on the references, from the VirtualMerchant project, then click on the Web.Payment project, and on the properties, it shows version 2.0.0. Then when I go to the debug folder, reach the Web.Payment project dll, right click to Details, it shows 2.0.1.
Now, I do not even know if I am interpreting the issue correctly based on the log below.
It is hard for me to interpret this.
*** Assembly Binder Log Entry (5/3/2021 # 3:56:48 PM) ***
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Program Files (x86)\IIS Express\iisexpress.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = com.clairs.providers.VirtualMerchant
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: com.clairs.providers.VirtualMerchant | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/develop/gitrepos/CDT/egovern/SysAuto.egovern.Web/Source/
LOG: Initial PrivatePath = C:\develop\gitrepos\CDT\egovern\SysAuto.egovern.Web\Source\bin
LOG: Dynamic Base = C:\Users\sakg\AppData\Local\Temp\Temporary ASP.NET Files\root\1df0e490
LOG: Cache Base = C:\Users\sakg\AppData\Local\Temp\Temporary ASP.NET Files\root\1df0e490
LOG: AppName = 68c4ab8d
Calling assembly : SysAuto.Web.Payment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\develop\gitrepos\CDT\egovern\SysAuto.egovern.Web\Source\web.config
LOG: Using host configuration file: C:\Users\sakg\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Users/sakg/AppData/Local/Temp/Temporary ASP.NET Files/root/1df0e490/68c4ab8d/com.clairs.providers.VirtualMerchant.DLL.
LOG: Attempting download of new URL file:///C:/Users/sakg/AppData/Local/Temp/Temporary ASP.NET Files/root/1df0e490/68c4ab8d/com.clairs.providers.VirtualMerchant/com.clairs.providers.VirtualMerchant.DLL.
LOG: Attempting download of new URL file:///C:/develop/gitrepos/CDT/egovern/SysAuto.egovern.Web/Source/bin/com.clairs.providers.VirtualMerchant.DLL.
LOG: Attempting download of new URL file:///C:/develop/gitrepos/CDT/egovern/SysAuto.egovern.Web/Source/bin/com.clairs.providers.VirtualMerchant/com.clairs.providers.VirtualMerchant.DLL.
LOG: Attempting download of new URL file:///C:/Users/sakg/AppData/Local/Temp/Temporary ASP.NET Files/root/1df0e490/68c4ab8d/com.clairs.providers.VirtualMerchant.EXE.
LOG: Attempting download of new URL file:///C:/Users/sakg/AppData/Local/Temp/Temporary ASP.NET Files/root/1df0e490/68c4ab8d/com.clairs.providers.VirtualMerchant/com.clairs.providers.VirtualMerchant.EXE.
LOG: Attempting download of new URL file:///C:/develop/gitrepos/CDT/egovern/SysAuto.egovern.Web/Source/bin/com.clairs.providers.VirtualMerchant.EXE.
LOG: Attempting download of new URL file:///C:/develop/gitrepos/CDT/egovern/SysAuto.egovern.Web/Source/bin/com.clairs.providers.VirtualMerchant/com.clairs.providers.VirtualMerchant.EXE.
LOG: All probing URLs attempted and failed.

IIS cannot load global type despite of existing dll

I'm trying to get an application to run on an IIS 6.0 that I was assigned to support.
I copied all the source and binaries to the Inetput folder. The WebApp is running, but I get the error that tells me that the global type of the application could not be loaded.
How can I debug this? The namespace is correct, the DLL is present in the /bin/ folder of the application, and still the app cannot load it.
After turning on Fusion logging, I found this error file that concerns my global class;
*** Assembly Binder Log Entry (05.11.2012 # 08:45:30) ***
The operation failed.
Bind result: hr = 0x80131107. No description available.
Assembly manager loaded from: C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\fusion.dll
Running under executable c:\windows\system32\inetsrv\w3wp.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = MyApplication
(Partial)
LOG: Appbase = file:///c:/inetpub/wwwroot/MyApplication
LOG: Initial PrivatePath = bin
LOG: Dynamic Base = C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\MyApplication\a1144233
LOG: Cache Base = C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\MyApplication\a1144233
LOG: AppName = 1ec25e47
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: MyApplication
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/MyApplication/a1144233/1ec25e47/MyApplication.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/MyApplication/a1144233/1ec25e47/MyApplication/MyApplication.DLL.
LOG: Attempting download of new URL file:///c:/inetpub/wwwroot/MyApplication/bin/MyApplication.DLL.
LOG: Assembly download was successful. Attempting setup of file: c:\inetpub\wwwroot\MyApplication\bin\MyApplication.DLL
LOG: Entering download cache setup phase.
ERR: Error extracting manifest import from file (hr = 0x80131107).
ERR: Setup failed with hr = 0x80131107.
ERR: Failed to complete setup of assembly (hr = 0x80131107). Probing terminated.
What's going wrong there? The bin\MyApplication.DLL exists and is compiled correctly, so I don't see the problem...
Reproducing the solution from the comments...
Step 1 is to enable Fusion Logging to get a log of what was failing
This produced the log file that indicates that IIS was trying to launch the DLL under version 1.1 of the .Net Framework. The error then occurred when it tried to read the manifest of the dll.
This indicates that the dll was from a later version of the framework and so couldn't be loaded.

The exception message is: Could not load file or assembly 'App_Code' or one of its dependencies. The system cannot find the file specified

I am trying to visit a WCF service endpoint like xxx.svc. And I got this error:
The exception message is: Could not load file or assembly 'App_Code' or one of its dependencies. The system cannot find the file specified
I turned on the fusion log and got this:
=== Pre-bind state information ===
LOG: User = xxx\xxx
LOG: DisplayName = App_Code
(Partial)
LOG: Appbase = file:///D:/myService/
LOG: Initial PrivatePath = D:\myService\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\myService\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\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.
I don't have the App_Code folder in my web application. Why does it look for App_Code???
Thanks!
I just figure it out after a good night sleep. I forget the precompiledApp.config file.
Probably you use an invalid reference or you are not referencing something you would like to use. The solution is to review your web.config and all references, searching for needed but missing references or invalid references.

Error "Unable to load requested types" when uploading DD4T.Templates.dll using TcmUploadAssembly

Trying to reupload the DD4T.Templates.dll into Tridion 2011 SP1 using the TcmUploadAssembly in the DD4T Tridion Tools folder - I've made sure the necessary DLLs are uploaded - DD4T.ContentModel.Contracts.dll, DD4T.ContentModel.dll, DD4T.Templates.Base.dll - but I keep getting "Error: Unable to load one more of the requested types".
Checking the Fusion log, I can see the following binding problem:
LOG: DisplayName = TcmUploadAssembly.XmlSerializers, Version=5.4.0.509, Culture=neutral, PublicKeyToken=360aac4d3354074b, processorArchitecture=MSIL
(Fully-specified)
LOG: Appbase = file:///D:/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = TcmUploadAssembly.exe
Calling assembly : System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Post-policy reference: TcmUploadAssembly.XmlSerializers, Version=5.4.0.509, Culture=neutral, PublicKeyToken=360aac4d3354074b, processorArchitecture=MSIL
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///D:/TcmUploadAssembly.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///D:/TcmUploadAssembly.XmlSerializers/TcmUploadAssembly.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///D:/TcmUploadAssembly.XmlSerializers.EXE.
LOG: Attempting download of new URL file:///D:/TcmUploadAssembly.XmlSerializers/TcmUploadAssembly.XmlSerializers.EXE.
LOG: All probing URLs attempted and failed.
No idea where this TcmUploadAssembly.XmlSerializers comes from?
There is a DD4T.ContentModel.XmlSerializers.dll in the build folder but this seems to be merged with others to form DD4T.Templates.merged.dll - but I've no idea what this is for.
Not sure where to start - is this a DD4T problem or a TcmUploadAssembly problem?
(I have tried the same steps with the TcmUploadAssembly in the Tridion 2011 SP1 install but got the same error, albeit for a newer TcmUploadAssembly.XmlSerializers, version 6.1.0.996)
Edit
Apologies for the confusion - I had added the DD4T assemblies into the GAC. My original post "I've made sure the necessary DLLs are uploaded" was misleading but I meant loaded into the GAC!
I'll check Mihai's point about registering with .NET 4 - it was late last night when I did this!
Version 5.4 is Tridion 2009. I don't think using TcmUploadAssembly from T2009 would work with T2011. So I definitely suggest using the latest TcmUploadAssembly (v6.1.0.966 for T2011SP1).
Have you registered the Templating DLLs DD4T.ContentModel.Contracts.dll, DD4T.ContentModel.dll and DD4T.Templates.Base.dll into the GAC on your TCM server? Just uploading them is not enough. Have a look at http://code.google.com/p/dynamic-delivery-4-tridion/wiki/40_Templates.
Also I see your error refers to .NET 2. Did you register the DLLs using .NET 4?
The recommended approach is to download the installer from https://code.google.com/p/dynamic-delivery-4-tridion/downloads/detail?name=DD4T-template-installer-1.31.zip.
This uploads DD4T.Templates.Merged.dll into Tridion, which includes the template DLL + all dependent DLLs merged together by ILMerge.
If you don't like ILMerge for whatever reason, you can put the following DLLs in the GAC:
DD4T.ContentModel.dll
DD4T.ContentModel.Contracts.dll
DD4T.Templates.Base.dll
DD4T.ContentModel.XmlSerializers.dll
You can get these DLLs by downloading the source code, opening the Dynamic Delivery Publishing.sln solution, and building it.

asp.net mvc windows azure migration System.BadImageFormatException: Could not load file or assembly 'Interop.SSCE' or

Hi have follows the steps here
Link
to migrate an asp.net mvc project to windows azure, The project builds ok, I then hit f5 and I get the error above. Does any one have any ideas why this is happening? I am new to azure so Im not too familiar with the process, Any ideas would be appreciated thanks
Stack Trace
=== Pre-bind state information ===
LOG: User = IP-0AE2B2DF\Administrator
LOG: DisplayName = Interop.SSCE
(Partial)
LOG: Appbase = file:///C:/Users/Administrator/Documents/Visual Studio 2010/Projects/TestProject/src/TestProjectCloudService/bin/Release/TestProjectCloudService.csx/roles/TestProject.Web/approot/
LOG: Initial PrivatePath = C:\Users\Administrator\Documents\Visual Studio 2010\Projects\TestProject\src\TestProjectCloudService\bin\Release\TestProjectCloudService.csx\roles\TestProject.Web\approot\bin
Calling assembly : (Unknown).
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\Administrator\Documents\Visual Studio 2010\Projects\TestProject\src\TestProjectCloudService\bin\Release\TestProjectCloudService.csx\roles\TestProject.Web\approot\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\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: Attempting download of new URL file:///C:/Users/Administrator/AppData/Local/dftmp/s0/deployment(3)/res/deployment(3).TestProjectCloudService.TestProject.Web.0/aspNetTemp/aspNetTemp/root/7dd3ee0f/d7fb43c0/Interop.SSCE.DLL.
LOG: Attempting download of new URL file:///C:/Users/Administrator/AppData/Local/dftmp/s0/deployment(3)/res/deployment(3).TestProjectCloudService.TestProject.Web.0/aspNetTemp/aspNetTemp/root/7dd3ee0f/d7fb43c0/Interop.SSCE/Interop.SSCE.DLL.
LOG: Attempting download of new URL file:///C:/Users/Administrator/Documents/Visual Studio 2010/Projects/TestProject/src/TestProjectCloudService/bin/Release/TestProjectCloudService.csx/roles/TestProject.Web/approot/bin/Interop.SSCE.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
Fixed, just removed reference to the web role project duh!

Resources