Coldfusion Programming: Accessing a shared network drive
As a Coldfusion developer, have you ever needed to use <CFdirectory> or <CFfile> on another network server or shared folder, other than the Coldfusion server? Trying to copy, move, delete or just check on files on another company server has always been an issue.
The problem with not being able to access a shared/mapped drive from another server starts with the installation of Adobe Coldfusion.
The typical install, set's the service, "Coldfusion 8 Application Server", and all it's companion services as a "Local System Account". .
The first step would be changing this to the admin account used to login to the server.
1. Login to the web server.
2. Right click on My Computer
3. Click on the plus sign, next to "Services and Applications"
4. Click on "Services" Look on the right side panel of the list of services. Look for "Cold Fusion 8 Application Server", or the version Coldfusion you are running. You should see in the "Log On As" column, "Local System"
5. Right click on this service, and select "Properties".
6. Click on the "Log On" tab and select the radio button, "This account". Click on "Browse" button. The "Locations" should be the server name. In the Object box, you want to select the admin user account, used to logon, or type the user name.
7. Restart the server.
Once the Service, "Log On As" has been changed to the admin account used to log on to the web server, you can map to a shared network drive. Once the network drive is mapped, you can use this in your Coldfusion applications.
Let's say I mapped "//172.16.0.75/support/" to drive letter T: and there are PDF files in a folder called "output". I want to use <CFdirectory> to list those files.
NOTE: On the Network server you want to map to, you need to set-up a user on that server, with the same username as the username used on the Coldfusion server .
Other ColdFusion Articles
- Adobe Coldfusion Tip For Finding Duplicate Records In SQL Database
- Coldfusion: allowing max file size when uploading
- ColdFusion: Monitor Hard Drive Space And Email Alert
- Coldfusion SQL Tips: Creating Tables, Backup, Fields
- Coldfusion Programming: Accessing a shared network drive
- Coldfusion: Encrypting and Decrypting Data
- Adobe Coldfusion Help: Query To Spreadsheet
- ColdFusion: Upload a pipe delimited file and insert into SQL table
- Coldfusion programming: How to submit muliple records at the same time that have the same field name
- How To Upload Multiple Files With ColdFusion
More by this Author
Firearms can be a very dangerous tool in the hands of the wrong person. Every state has their own gun laws and regulations. For the state of Georgia, the laws are pretty straight forward and easy to abide by. Before you...
Until this year, the only time that I've had mice or rats in the house were when my daughter had pet mice and rats, and one of those times we did have one loose in the house. (Science fair project got loose.) Anyway,...
You may refer to a truss as the rafter, but it's basically the skeleton of the roof, carrying the weight of the frame and supporting the walls of the building. Trusses are very important to preventing the walls from...