Friday, May 23, 2008

CF: cfhttp and The column name "" is invalid.

The other day we were looking at cfhttp to parse out a CSV (comma seperated values) file. It worked beautifully on the test systems but would not run when transferred to staging site.
We would get this error consistently.

The column name "" is invalid.

None of the internet resources regarding this was very helpful. So after many trial and errors we discovered that the webserver we posted this to had basic user authentication switched on, thus we needed to provide username and password attributes of the cfhttp tag for this to work.
Another perfectly good example of how the simple things get you. Would have been helpful too if the cfhttp tag could throw a more meaningful error.

2 comments:

Nikhil Hari said...

Having this problem but not sure where can I find the user authentication info that you've mentioned?

bman said...

This will depend on the webserver used. For IIS you setup the access control using windows security on the directories:
http://www.microsoft.com/windowsxp/using/security/expert/accesscontrol.mspx

If you have done so for webfolders, you will have to provide the username and password of a user you have granted access to get to the contents via a browser.