Highlighted

Unable to create an object of an assembly.

New Here ,
Dec 13, 2016

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?

Views

169

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Unable to create an object of an assembly.

New Here ,
Dec 13, 2016

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?

Views

170

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 13, 2016 0

Have something to add?

Join the conversation