I'm a junior C# developer and I'm trying to learn Web Development with ColdFusion. I'm having difficulty running this example in the documentation: Using a .NET class directly. This is just a simple cfm code to test .NET function on ColdFusion.
<cffunction name="Ping" returntype="string" output="false">
<cfargument name="host" type="string" required="yes">
<!--- Local variables --->
<cfset var pingClass="">
<cfset var pingReply="">
<!--- Get Ping class --->
<cfobject type=".NET" name="pingClass"
class="System.Net.NetworkInformation.Ping">
<!--- Perform synchronous ping (using defaults) --->
<cfset pingReply=pingClass.Send(Arguments.host)>
<!--- Return result --->
<cfreturn pingReply.Get_Status().ToString()>
</cffunction>
I installed ColdFusion 2016 with these settings: Server Configuration, Production Profile + Secure Profile with IP address 127.0.0.1, .NET integration Service, and Built-in web server.
I placed the CFM code here C:\ColdFusion2016\cfusion\wwwroot\test.cfm and I ran it through the browser like this http://127.0.0.1:8500/test.cfm. The error that I get from jnbridge log is "Class Not Found". I have .NET framework installed and the ColdFusion .NET service is running. I also tried restarting everything but it still won't work. Please help. Thank you.