The Trouble with CF8's .NET Integration
for the Flex front-end.
Before bidding the project, I decided to try to connect to the .NET Object first and access a Playlist class that would provide the Flash Media Server 2 RTMP addresses, and other details about streaming videos that would play on the Flex side. I am more determined than usual to make something new like this work, because this could really open the doors of opportunity for more projects in 2008 and beyond, so I am doing this preliminary experimentation for free (prior to bidding the project) so I can create a more accurate bid.
Ten hours later, I am more perplexed than when I started. The assembly .dll file is completely documented, with a website that lists Classes, Methods, and Properties. The class I want to connect to exists, but the CF8 Error says the method cannot be found.
It was later revealed by the .NET Team who created the .dll assembly that they didn't exactly follow all of the rules when creating the .NET Assembly. It is NOT "strongly named." A .NET Assembly that is strongly named, has a cryptographic key that is generated, along with other .NET specific attributes. Nice! No mention at all in the LiveDocs that the .NET Assemblies you want to connect to have to be "strongly named." (I am sure something that like is assumed, like if you are breathing, it must be air). On the flip side, I sure didn't read anything on the web that a .NET Assembly could be created without it having the criteria that makes it a .NET Assembly (that's something only .NET coders know of and do).
So beware fellow CFers - the Adobe LiveDocs will tell you
So what's important to note here, is that knowing the right questions to ask about the .NET Assemblies you want to connect to, will undoubtedly save you time and frustration. Hopefully this experience that I have blogged will help you be more efficient with CF8's .NET Integration feature.
I will blog further on this once I get a properly created .NET .dll Assembly to work with. My suspicion is that it will work, as easily as billed by Adobe, once a proper .NET Assembly is provided.
If anyone else out there has experience with this feature, please leave a comment for secrets to success. I am pursuing the simplest solution with a local .NET Assembly using .NET Framework v2.0. The .NET team I am working with was encouraged that we didn't have to use the GAC (Global Assembly Cache) which is an option the LiveDocs lists as an option. I don't know if all .NET Developers have the same attitude of avoiding the GAC, but it might save you some time to ask about it.

![Validate my RSS feed [Valid RSS]](/images/valid-rss.png)

Both have support for exactly what you're after, as well as support for the RTMP protocol (though this is more mature in WebOrb than Fluorine at the moment).
Addmitadly, I haven't ever tried the CF approach, (or ever used CF), so I can't offer any insight into the differences.
However, I highly reccomend both of these products, which I've used both extensively.
We need to be able to integrate with NTLM and Active Directory. Using BlueDragon, it was a simple as <Cfset user = #System.Security.Principal#>
Anybody doing anything like this with CF8 and .NET interop?
When we try to use the connection string that is defined in the web.config file we get an error that "The ConnectionString property has not been initialized"
If you have any further results then I would be very interested to know what you found.
I've also been trying to get the integration to work. I'm trying to use the System.Messaging dll to write to the Mircosoft Messaging Queue (MSMQ). I can't seem to get CF to find this dll.
I get the following:
Class System.Messaging not found in the specified assembly list. The assembly that contains the class must be provided to the assembly attribute.
When I try to add the assembly attribute (on my server the path is C:\WINNT\assembly\System.Messaging.dll), it says it cannot find it. But I don't think that is really where it live because doing a file search in Windows Explore also won't return an results when searching for the above file in the WINNT directory.
I've also tried to add this assembly using the jnbproxyGui.exe, but it seems to not allow me to build the project.
Any ideas?
This is something that I have used to find out the locations of the .dlls
http://www.aisto.com/roeder/dotnet/
It is the Reflector for .NET. A very useful tool for traversing through a dll and finding the classes.
Hope it helps
i made an example on how to use .net + coldfusion... i hope it helps
(it encrypts a string with a Rijndael algorithm 256 bit)
<cfobject type=".NET" name="myRijndael" class="System.Security.Cryptography.RijndaelManaged" assembly="C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Security.dll">
<cfobject type=".NET" name="myConvert" class="System.Convert" assembly="C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll">
<cfobject type=".NET" name="myCipher" class="System.Security.Cryptography.CipherMode" assembly="C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Security.dll">
<cfobject type=".NET" name="myEncoding" class="System.Text.UnicodeEncoding" assembly="C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll">
<cfscript>
str = "hello";
key = "vXPlTT0bI2Bd2zPwW2sqRRAn8TQ8YmV/iC4+qQgzeNY=";
myRijndael.Set_Key(myConvert.FromBase64String(key));
myRijndael.Set_Mode(myCipher.ECB);
encryptor = myRijndael.CreateEncryptor();
data = myEncoding.GetBytes(str);
dataEncrypted = encryptor.TransformFinalBlock(data, 0, myEncoding.GetByteCount(str));
returnString = myConvert.ToBase64String(dataEncrypted);
</cfscript>