Here is the C# Code for the class:
using System;
public class HelloWorldProc
{
public HelloWorldProc()
{
}
public string HelloWorld()
{
return "HelloWorldProc:HelloWorld called and returns Hello world!";
}
}
Here is the page output:
Ping Test
127.0.0.1: Success
www.adobe.com: Success
Error Occurred While Processing Request
Class HelloWorldProc not found in the specified assembly list.
The assembly that contains the class must be provided to the assembly attribute.
The error occurred in C:\inetpub\wwwroot\DotNet\DotNetTest2.cfm: line 25
23 : name="HelloWorld"
24 : class="HelloWorldProc"
25 : assembly="C:\inetpub\wwwroot\DotNet\CFDotNetTest.dll" >
26 :
27 :
Here is the command line program:
I added the CFDotNetTest Project as a reference in the ConsoleApplication1 project so that the console app is aware of the dll.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using System.IO;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
HelloWorldProc h = new HelloWorldProc();
Console.WriteLine(h.HelloWorld());
string q = string.Empty;
Console.WriteLine("Type \"exit\" <Enter> to quit the sample.");
while (q.CompareTo("exit") != 0)
{
q = Console.ReadLine();
}
return;
}
}
}
Analysis:
1. The Ping test tells me that .Net Integration Services are running.
2. After uploading the files that were generated by the compiler to my CF server running CF 9, I run a program from the command line to test the assembly and it works.
3. I reinstalled Dot Net Integration Services.
4. The C# code was compiled under Dot Net 4.0. This may be the problem. I cannot verify that Dot Net Integration services supports Dot Net 4.0.
Any ideas or help would be greatly appreciated.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340267