Getting System Info with Coldfusion 8 and .NET

Tagged Under :

This is yet another example of how native .NET objects can be easily consumed from Coldfusion 8. Recently, I have been spending some of my time on this particular aspect of Coldfusion 8, as is obvious from some of my posts. For those who are not aware, Coldfusion 8 supports calling .NET objects simply by using the CFOBJECT tag or the CreateObject() method. You need to pass in the .NET assembly (ideally a .dll file) and the class of that assembly, as parameters to the CFOBJECT tag. By default, mscorlib (which is a .NET core assembly) is always included so there is no need to specify that if the class you are using happens to be one of the classes from this assembly.

More »

Different ways of making a Thread Sleep

Tagged Under : ,

There are several occasions when we need to stop processing the page for a period of time. Before the release of Coldfusion 8, we could use Java’s sleep function to do that. The purpose of this post is to list the ways available to make a thread sleep in server side code.

Here is the first one, the most common one :-

With the release of Coldfusion 8, we can now also use the native .NET objects from within Coldfusion, here is how this can be done using .NET objects.

And last but not the least, Coldfusion 8 supports this via the CFTHREAD tag as well.

And we can do it via the Sleep function as well

Choose SQL Server Instance in CF Administrator

Tagged Under :

Radek has written a nice tool using which you can add a custom button to your Coldfusion administrator which will let you choose a running Sql Server instance while adding a Sql Server datasource. Pretty slick I must say.

Directory Listing using Coldfusion 8 and .NET

Tagged Under :

After doing my first example with CF8 and .NET, I got a little excited and wanted to do more with it. I am not really a .NET guy and have very little know-how of how it works. However, I have been trying to do something rather useful with it and I thought it might be a good idea to actually try to mimick the CFDirectory functionality using .NET objects. I have done that previously in Java as well but this time around its .NET .

For those, who are not aware, the mscorlib assembly is always included by default whenever .NET objects are created using Coldfusion. Therefore, we dont need to specify explicitly the “Assembly” attribute in the CFOBJECT or CreateObject call. Because my example uses System.IO.DirectoryInfo which is a part of mscorlib, so I dont need to specify an assembly here.

More »

Coldfusion 8 and .NET - My first Attempt

Tagged Under :

We all know Coldfusion8 has some aded functionality for .NET integration. What that basically means is, Coldfusion can now interact with .NET assemblies simply by creating an object. We could always consume .NET webservices in Coldfusion in earlier versions but that had some datatype compatibility problems. In Coldfusion 8, it allows us to access native .NET objects as CFML objects and it also converts data types automatically. That sounds cool enough. So, I decided to go ahead and try it out, just a very little “hello world” kinda example. More »

Coldfusiondocs.com Updates

Tagged Under : , ,

I had some free time this weekend so I decided to work on some of the requested features of coldfusiondocs.com. I could not get a lot done but here is what I have done :-

The search now allows for a “type search” which means you can now search for e.g. Application framework tags, data manipulation tags etc. This was the most asked for feature. So here it is now!

Secondly, I really wanted to work on some way of bookmarking feature to be available. So I used this SWFAddress tool to implement some Deep Linking, it seems to work, however, I am still not confident that its got to a point where I want it to be. More to come on this later. But for now, just those minor updates have been implemented.

The app can be found here .

Any problems, please get in touch.

Coldfusion and NULLS

Tagged Under :

There is an interesting post from Radek here . I kinda agree that we as developers shouldnt be left with the job of having to deal with NULLs on our own. It would be better if there was some sort of inbuilt way to deal with it.

How to get detailed drive information through COM

Tagged Under : ,

Back in 2001, when CFComet was live, I wrote a little script to read detailed drive information (windows only) via COM. I thought it might be a good idea to post it here as well. This code makes use of the FileSystemObject and displays some useful information. I did a little search and its still Live. Here is the code :- More »

coldfusiondocs.com is now LIVE

Tagged Under : , ,

As a result of feedback from one of my previous posts , I have made a few changes based on the feedback and the site is now live. This site is basically about giving a new face to the Coldfusion documentation, valid upto the latest version.

Website : www.coldfusiondocs.com

Documentation : www.coldfusiondocs.com/app/

CFFTP Inconsistency

Tagged Under : ,

I’ve got a scheduled task running that generates a file and sends the file over to a FTP server every day. I have been expereincing some very inconsistent behaviour with the way this works.

Almost 50% of the time, the FTP connections gets opened and then when it tries to upload the file, it fails. If I just go in and re-run the scheduled task, there is a chance that it might work in the first attempt but if not, it works in the second attempt. When I try to access the FTP server via other means like command prompt or FTP clients, I never get any kind of timeouts or connection problems.  I tried increasing the timout on CFFTP tag but didnt help as well.

Does anyone know if this is something to do with the CFFTP tag ? has anyone else come across this before. ?