Does the BinaryFactory work for binaries on the file system? - tridion

I'm trying to read the binary data of a published binary using the following code:
Tridion.ContentDelivery.DynamicContent.BinaryFactory factory = new BinaryFactory();
BinaryData binaryData = factory.GetBinary(uri.ToString());
This worked fine, until I deployed it in an environment where the binaries are stored on the file system rather than the broker database. Now, the BinaryData is always null, even though I'm sure that the file exists.
Is it mandatory to store your binaries in a database if you want to use the BinaryFactory like this? Or am I missing something?

I just ran some tests on my SDL Tridion 2011 SP1 HR1 environment, and can confirm that BinaryData is populated (i.e. not null and contains values) when my binaries are on the file system. I used your code sample, and just added a valid URI of a binary that is used on a page on my website. I am not sure what is different between our environments, my only thought would be to check that BinaryMeta is deployed to your Broker Database (although if this makes a difference I would think it is a bug).
The ItemTypes node of my cd_storage.xml node is as follows:
<ItemTypes defaultStorageId="defaultdb" cached="true">
<Item typeMapping="Binary" storageId="defaultFile" cached="true"/>
</ItemTypes>
So everything except the binaries are in the DB.
I am not sure what version of SDL Tridion you are using (and i have no idea if it would impact this), but I recently heard that storing any metadata on the file system is no longer supported as of 2011 SP1.

Related

SSDT Project Structure when updating using SchemaCompare

I have set up my sqlproj project structure based on object type using the import Database wizard and using the Object Type as the folder structure. ie the same view as you'd get in SSMS or SQL Server Object Explorer
Yet when using ssdt schema compare to update the project, objects are always imported into Schema\Object Type structure, causing the project to turn into a mess of mixed structure.
I cant find anywhere I can change the behaviour of the Schema Compare update to continue to use the Object Type structure?
using ssdt 14.0.51215 (Dec 2015)
I would suggest submitting this feedback as a suggested improvement to Microsoft at https://connect.microsoft.com/SQLServer/feedback/CreateFeedback.aspx using the category "Developer Tools (SSDT, BIDS, etc.)"
you'll have to update the sqlproj file directly...
<PropertyGroup>
...
<DefaultFileStructure>BySchemaType</DefaultFileStructure>
...
</PropertyGroup>
More info on this link... https://social.msdn.microsoft.com/Forums/sqlserver/en-US/e6bfd561-3e7d-4052-be9c-631037681c3e/default-file-structure?forum=ssdt

Best way to get the Biztalk orchestration source code from the exported MSI

In one of my project, the developer forgot to check in the changes done to biztalk orchestration but the changes were delivered and installed in production server. I would like to know the best way to get the Biztalk orchestration source code from MSI file/Biztalk. I have read a thread about using a Decompile too but not sure how to get the source code.
Another option is to BizTalk documenter for 2006, 2010 (and soon to be released BizTalk 2013) and generate a help file that documents the Orchestration.
Update: Both of the version above are no longer being supported. The latest versions of BizTalk Documenter for BizTalk 2006 through BizTalk 2013 R2 can be found here
Full Disclosure: I'm one of the developers on this new version.
While you can't decompile to the original Project, you can extract the 'source' files for the artifacts themselves. They're included in the assembly as string resources.
So, once you find the Orchestration source, save that as a .odx in a new Project.
Update:
Note that
The ODX code will be in a private const string _symODXML. Copy that string.
The string will has a lot of \n through it, remove those. After this it should be valid XML.
The string starts at <?xml and finishes at </om:MetaModel> whereas the ODX has some bits before and after that string. So you need to paste into the ODX file so that you replace the central part that matches it in the ODX file and leaving the parts before and after it intact.

TaxonomyDAO is set to File System, which is not supported

I am running Tridion 2011 SP1 and am getting the following warnings in my cd_core.xxxx.xx.xx.log file.
2012-10-17 12:37:50,298 WARN FSTaxonomyDAO - TaxonomyDAO is set to File System, which is not supported. Check your bindings settings and/or license file.
I have removed the following element from the cd_deployer_conf.xml
<Module Type="TaxonomyDeploy" Class="com.tridion.deployer.modules.TaxonomyDeploy"/>
but I am still getting warnings.
I think this problem is causing many of my multimedia components to fail when publishing. If fixing the cause of these warnings doesn't help then I'll have at least narrowed it down.
edit
I forgot to mention that I am using the File System as the Content Data Store
The storage bindings are in cd_storage_conf.xml. You need to check in storage config and should be storage to db. Also you should not remove from deployer if you are using taxonomy.
Update:
Taxonomy storage to file system bindings is not supported as far as I Know it can be only to DB, it is the same from release 2009 and What you are seeing is the WARNING message that you are using non supported. I am not sure if you can disable this binding.
Also, Metadata stored on the local file system is deprecated as of SDL Tridion 2011 SP1, in favor of storage of metadata in the database. SDL Doc reference link.

Why can I not compile an object in Dynamics NAV containing an OCX?

I imported a Form object from a text file. When I try to compile it I get the following error message:
This message is for C/AL programmers:
The OLE control or Automation Server identified by 'Microsoft Common Dialog Control 6.0 (SP3)'.CommonDialog requires a design time license.
This license cannot be obtained.
Make sure that the OLE control or Automation server is installed correctly with an appropriate license"
I am developing in Dynamics NAV using a developer license. The OCX is registered correctly, gets listed in NAV's "Custom Controls" as pointing to "C:\Windows\SysWOW64\comdlg32.ocx".
Why am I not allowed to compile the object?
The license in question is, as you said, purely for using the CommonDialog component in design-time environments. This has nothing to do with your NAV license or your customers being able to run code that uses the component. The design-time license (which is nothing more than a key in your system registry; not an actual license file) used to get installed with e.g. Microsoft Visual Basic 6.0 or older versions of Microsoft Visual Studio.
If you have access to VB6.0 or VS2005, you can use VB6Controls.reg on the installation disk as described here: http://support.microsoft.com/default.aspx?scid=kb;en-us;318597.
As the message said, the components loads, try to get a license and don't get one. So you don't have one as it says or you don't have it in the path lookup the components looks at it.
There is one more trick you can do to fix this problem and avoid installing a lot of crap like VB6.0.
This message is related to certain automation type variable in the object you trying to compile.
You can copy this variable from any other compiled object in other database or any other compiled object in the same database. And then your imported object will magically compile. Just delete the variable from your imported object's variable list and copy it from compiled object with copy-paste.
I don't know what magic is that but it worked for me many times. I copied variable from the same object in restored backup of the database.

Active Record and Linq T4 Templates problem

I've started a C# web application project using subsonic 3.0.3 as my DAL and SQLite for database.
It doesn't have any problem when using SimpleRepo, but the problem occurs when I try to use ActiveRecord/Linq T4 templates.
It says "Metadata file 'System.Data.SQLite' could not be found". The settings.ttinclude is the one provided with SQLite.ttinclude file and its config looks ok, and other files are instructed to use SQLite.ttinclude of course. I've also tested them with an SQL Server database and everything goes fine.
Also tried searching about it on the net and all I could find were these:
Subsonic Google Groups which instructs me to add a reference to System.Data.SQLite to the top of settings.ttinclude. No luck.
Someone at here commented about this issue, and it was answered to check the connection string, which doesn't seem to be my problem, because the app works when I use SimpleRepo.
Is SQLite installed on your machine? You need the .NET driver for it as well (that's what can't be found).

Resources