Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to reference a .NET assembly from ColdFusion?

Is it possible to reference a .NET assembly from ColdFusion? If so, how can I accomplish this? I am not a ColdFusion developer by any means.

like image 819
George Johnston Avatar asked Feb 15 '10 22:02

George Johnston


People also ask

Is ColdFusion still used?

More than 300,000 developers at over 10,000 companies worldwide rely on ColdFusion to quickly build and deploy powerful web applications. And with more than 125,000 ColdFusion servers deployed, ColdFusion is one of the most widely adopted web technologies in the industry. A total of 643,663 websites use ColdFusion.

Is ColdFusion Java based?

ColdFusion is built on a Java Enterprise Edition (JEE, formerly termed "J2EE") technology platform. This structure lets ColdFusion applications take advantage of, and integrate with, JEE elements.

What is ColdFusion used for?

Adobe ColdFusion is an application server and a platform for building and deploying web and mobile applications. Use ColdFusion to create dynamic internet applications. ColdFusion is a rapid scripting environment for creating dynamic internet applications using ColdFusion Markup Language (CFML).


1 Answers

You can call .net Assemblies directly since CF8.

Example:

<cfobject type=".NET" name="mathInstance" class="mathClass"
          assembly="C:/Net/Assemblies/math.dll">
<cfset myVar = mathInstance.multiply(1,2)>

or

mathInstance = CreateObject(".NET", "mathClass", "C:/Net/Assemblies/math.dll");
myVar = mathInstance.multiply(1,2);

CF8 Doc - Using Microsoft .NET Assemblies

CF9 Doc - Using Microsoft .NET Assemblies

JNBridgePro is used under the hood to make this possible. Reference: BlueDragon.NET versus CF8 .NET Integration: Architecture.

like image 176
Henry Avatar answered Nov 11 '22 00:11

Henry