Unable to Initialize TDSE object. Could not load file or assembly 'Tridion.ContentManager.Publishing while accessing the Tridion UI - tridion

While opening the Tridion UI I am getting this error:
Unable to Initialize TDSE object. Could not load file or assembly 'Tridion.ContentManager.Publishing, Version=6.1.0.996, Culture=neutral, PublicKeyToken=360aac4d3354074b' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) The type initializer for 'Tridion.ContentManager.TypeRegistry' threw an exception.

Most probably you have some extension or something like this that you have copied from the network and your DLL get locked. You need to find this DLL and click Unblock from the context menu. You will most probably have to do it for all other copied dlls as well. It should look like this:
http://www.izenda.com/Site/KB/Uploads/Images/unblock.PNG
In case you have no idea where to look - use procmon

I would also double check Tridion.ContentManager.Publishing dll is in the GAC.
A quick way to see this is to look in c:\windows\assembly and match the version of the DLL as well. You could re-drag and drop the DLL there to make sure all is well.

Related

web.config comments included in line error?

I'm troubleshooting an app, and I have this error to work with:
Exception message: Could not load file or assembly 'This.File,
Version=1, Culture=neutral, PublicKeyToken=[sometoken]' or one of its
dependencies. Access is denied. (C:\Program Files[file
location]\web.config line 205
Now - is that exactly line 205 of the web.config file, or is that line 205 if all the comments and empty lines from the web.config are removed?
I've tried researching this but find it very tricky!
Thank you!
This error means that there is an assembly referenced in the web.config that the compiler cannot locate. There are tactics to troubleshoot this. First, if you have the DLL make sure it is referenced by your project.
If it is a library located some where on your test machine, you can use this tool from the .NET Framework SDK - Assembly Binding Log Viewer https://msdn.microsoft.com/en-us/library/e74a18c4(v=vs.110).aspx. This tool will tell you where .NET is looking when its trying to find your assembly.
If you want to load the assembly dynamically at run time, you can catch this error in code by handling the AssemblyResolve event on the current AppDomain: https://msdn.microsoft.com/en-us/library/system.appdomain.assemblyresolve(v=vs.110).aspx

Unable to load DLL 'xmogrt': from Tridion metadata query

I'm trying to use the CustomMetaKeyCriteria class to pull back content from the Broker DB based upon some metadata I set up. However, I get the error listed below. Any ideas? That dll is in my bin folder & I confirmed it is the 32 bit version, as this code is running on a 32 bit box. I missed some set up obviously, but what?
Unable to load DLL 'xmogrt': The specified module could not be found.
(Exception from HRESULT: 0x8007007E)
Check if you have the rest of the dll dependencies for this file?
In my install folder for x86 I see the following DLLs:
MSVCP71.dll
MSVCR71.dll
netrtsn.dll
Tridion.ContentDelivery.Configuration.dll
Tridion.ContentDelivery.dll
Tridion.ContentDelivery.Interop.dll
xmogrt.dll
EDIT: And the following Tridion jars:
cd_broker
cd_cache
cd_core
cd_datalayer
cd_deployer
cd_linking
cd_model
cd_tcdl (not usually needed)
You should probably check cd_core_log for additional details, maybe you're missing one of the 3rd party jars.
Your DLL may be blocked if you copied it from a network location. Try right clicking on the DLL > Properties > Unblock

Could not load file or assembly when trying to remove/delete Resource/Application

I have a Biztalk application that is basically a housing for a schema that other applications are using. I now want to remove this application, but am unable to from the BizTalk Server Admin Console, when I right-click --> Remove I get an error that says
Could not load file or assembly <assembly_name>.dll or one of its dependencies. The system cannot find the path specified (mscorlib)
followed by:
The system cannot find the path specified (Exception from HRESULT: 0x80070003)
So I go to remove the assembly from the Application and get the exact same error. I remove all references to it in other biztalk resources and still the same error when trying to delete the application or resource. I did notice that in the Modify Resouces dialog of referencing assemblies, this rogue assembly is listed as a dependency status of Not Found.
The strange thing is, when Messages come through, the resources which depend on the rogue assembly, still work fine and no errors are thrown (despite them using components of the assembly which shows as Not Found).
I have made sure to check the GAC and the assembly is loaded to it.
So now I have to ask:
where is Biztalk actually looking for this assembly?
is there a way I can just force a deletion of this application?
why does it care if the assembly is not found, when I'm trying to delete it?
why does it show as Not Found, yet still work?
Thanks.
I think the key is "or one of its dependencies." If it's a dependency it may be using the standard windows mechanism for finding a dll. It searches the current directory and the windows directory for them.
"where is Biztalk actually looking for this assembly?"
Look in the 'resources' section of your application in the biztalk management console. It shows a column with the location of the assembly.
I'd stop all the host instances/orchestrations, and then unload all your stuff from the GAC - if messages are actually still going through then stuff is still loaded that is using your schema.

Assembly loading error in my ASP.NET app, and the assembly isn't even referenced anymore

I had some code that referenced the Noesis.Javascript assembly (http://javascriptdotnet.codeplex.com) and had renamed the Noesis.Javascript.dll to Noesis.Javascript.0.4.dll. I referenced this file through Visual Studio, and when I launched my web app in the ASP.NET development server, I got this error:
Could not load file or assembly
'Noesis.Javascript.0.4' or one of its
dependencies. The located assembly's
manifest definition does not match the
assembly reference. (Exception from
HRESULT: 0x80131040)
I then tried to remove this reference and re-reference the older version of the library. I got the same error. I then tried to remove this reference entirely and comment out all code that used this library. I still get the same error. I have tried to explicitly close out the ASP.NET development server from its icon in the system tray, but this still occurs. I can find no reference of this assembly anywhere in my project now, yet the error persists. What might be happening? Is there some cache that I'm not finding? How can I resolve this error?
Go into the registry and set [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Refresh the page and the error output will show you which assembly has a dependency on Noesis.Javascript.0.4.
Check if "Noesis.Javascript.0.4" appears anywhere in your web.config file and remove it if it does. It might be in the <assemblies> part.
remove the reference and add it again. Please note that the two dll version must be same. Do not add any later version, if its get registered into your web.config, otherwise you need to remove from there too.
In my case, I added a wrong DLL. Instead of adding 64bit, I added 32bit.
Thanks,

ASP.NET How to add assembly in web.config?

I have a assembly made in another project (projA). Now I want to import this dll in another project (projB). How can I achieve this? This is what I've tried (in projB).
1 Put dll in same dir as my project. (the bin dir)
2 In web.config:
<assemblies>
<add assembly="projA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
This is the error I get:
Could not load file or assembly 'projA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
EDIT:
The point is that eventually the assembly reference must me added dynamically
EDIT 2:
The name of the assembly (and namespace) are stored in the database. The physical assembly (dll) is added (by installation) in projB. Now the code in projB must read the assembly name from the database and then add a reference to the dll which is added by installation.
Are all of projA's dependencies in projB? Usually I'd just add a reference from one project to another if they are in the same solution.
Edit:
If you want to add an assembly dynamically then maybe a service reference maybe something to consider. By dumping in projA's DLL into the bin that doesn't really give all the DLLs that it may require, thus there are ways to tie things together so that objects can be understood across systems, like web services using XML to give a common example.
My question back about adding an assembly dynamically is where would you get it from and can that part be automated to be part of projB as that is really the general solution to this kind of problem.
Edit 2:
How could you get all of projA's dependencies? Is it possible to get it so that it doesn't depend on a bunch of other DLLs that may or may not be on the system that this is to run. That is what the error is telling you, that there exists some assembly projC that is also required. Note that this adding of assemblies can continue for a long time if there are many levels of dependencies used.
Summarizing the answer: What would you need to reference in order to load projA into some new project? That's your problem which without knowing what the dependencies look like is rather hard to answer directly.
You do not need to add anything in Web.config if the assembly DLL is in the Bin folder - you only need to do this if you are referencing an assembly that is in the GAC.
The error message you are getting is basically saying that the assembly can't be found in the GAC, which is presumably because it isn't there!
You don't need to manually add the reference in the web.config file. Right click on your project in the Solution Explorer window in Visual Studio and select 'Add Reference'. Go to the Browse tab and find the DLL you created in the other project, select it and click OK. Optionally, you can add the project A to the same solution as project B and then add the reference through the Projects tab of the Add Reference window.
The error
The located assembly's manifest
definition does not match the assembly
reference.
suggests that a DLL was found but did not match the version, or public key.
I would suggest double checking to ensure that the assembly reference matches the version information and that no rogue DLL's with old version numbers are located in the /bin paths or the GAC
Well, I guess to some extent it depends on what you are planning on doing once you've loaded the assembly, and what you've got in the assembly.
I'll assume you've got some sort of plugin architecture, with a known interface or base class that you're going to be calling methods on, lets say IPlugin.
Anyway, here's how to load an assembly dynamically, based on storing a reference to it in either a config section or a DB column somewhere:
private IPlugin LoadPlugin(string fullTypeName) {
Type type = Type.GetType(fullTypeName, false, true);
Object plugin = Activator.CreateInstance(type);
if (plugin is IPlugin) {
return (IPlugin) plugin;
}
// Handle the fact you've not got what you expected however you like
throw new ApplicationException(error);
}
So this will take a string such as "projA.PluginClass, projA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" load the assembly, and return you an instance of the class you're interested in.
You would then use it like this:
// Call to DB to get details of class and assembly
string pluginClass = GetPluginDetails();
IPlugin plugin = LoadPlugin(pluginClass);
// Call known method to do something on IPlugin
plugin.SomeMethod();

Resources