Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Upload file with CFFILE but with IIS security active 2

Status
Not open for further replies.

peruano

Programmer
Jan 22, 2001
7
0
0
PE
Amigos:
This is the idea: I have a form with 1 select box and also a input type="file" to upload a client file.
It works perfect: the client select the file and it is save using CFFILE tag in the server directory.
But when I set Internet Information Server (ISS) Security to restrict access (following the Allaire recomendation to use my web program security - It Works!), an error ocurred in the uploading cfm page, saying that the varialbe does not exist. Obviusly it exists but the ISS security does not let it to be created or maybe not to save the file in the server.
I will appriciate a lot your help and also I can help you guys
 
I'm not sure I understand what you're having problems with. It sounds like your form was working, then you restricted access to the directory, and now it doesn't work. That's what I would have expected to happen if you restricted acces to it so I'm a little confused.

If what you're trying to accomplish is have a form that lets people upload files to the server but prevents anyone from viewing them, I think this will work.

1. Set CF to run under an NT acount (assuming NT server)
2. Give the account CF runs under read/write permission to the upload directory.
3. Restrict read/write access to anonymous users

I think that will work although I haven't tested it.

Let me know if I misunderstood the problem.
GJ
 
Well, thank you GunJack, but I can't do it. You are right I have an NT 4.0 server and I gave privileges to the f: disk to all user (because I dont know the username for the CF, do you know it?), but it didn't work.
can you give me more details, for instance, the CF NT username...
Than you again
It seems that we are on the way..:)
 
Hey peruano,

To check or set the CF username, go to the Control Panel and run "Services". You will see a list of all the NT services currently running. Double click the one which reads "Allaire Cold Fusion Application Server" or something similar. Different versions are named slightly different.

Once you double click on it, you will see the account information at the bottom of the pop-up window. If it is set to run under a specific account, the "This Account" radio button will be selected and the account will be shown. If not, the "System Account" button will be selected and it will use a system account.

Is this what you needed?
GJ
 
GunJack: I finally identify (but not solve) the problem. The thing is that the tag <input type=FILE> used in my uploading form causes the error when security is activated. Because when I check anonymous login on the IIS, it works perfectly. Now, when security is active, and I delete the line of the tag <input type=FILE>, all the other variables are passed (I checked that) . When I paste again that line, no variable appears and ColdFusion says:

Error Diagnostic Information
Error resolving parameter TEXTO2(this is a simple text variable preceding the <input type=FILE> tag

Cold Fusion was unable to determine the value of the parameter. This problem is very likely due to the fact that either: ....

What do you think?
 
GJ, I had to give you a star!!! I have been having these issues with <CFFILE> not uploading for the past week and could not find a solution. Your recommendation (set the user account in services) resolved my issue. Thank you so much!!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top