Copy link to clipboard
Copied
Hello all,
I am very new to ColdFusion and am trying to create an instance of an assembly. Here is the two different paths I have tried so far:
*Note* Calculator is the name of the assembly/namespace and Calc is the class inside of the assembly.
<cfobject type="dotnet" name="calcInstance" class="Calculator.Calc" assembly="C:\ColdFusion2016\cfusion\wwwroot\WEB-INF\cfclasses\dotNetProxy\Calculator.dll">
and
<cfscript>
calculatorInstance = CreateObject(".NET", "Calculator.Calc", "C:\ColdFusion2016\cfusion\wwwroot\WEB-INF\cfclasses\dotNetProxy\Calculator.dll");
myVar = calculatorInstance.addition(1, 1);
</cfscript>
Both return "The error occurred in C:/inetpub/wwwroot/Test/index.cfm: line"
There's no specific error that is given, just tells me that there was an error. I have JNBDotNetSide.exe running. I'm really not sure what I'm doing wrong.
Does anyone have any suggestions on what to do?
Have something to add?