Click here to Skip to main content
15,890,947 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Friends,

Am trying to upload a doc file through file upload control in asp.net, at that time am creating a temp folder called e:\temp\documents\ if its not available.
Same works fine in my local machine, but when I try to run it in my server, it gets hanged up, I looked into log file for error there this message is logged

Quote:
Message: The device is not ready. - at Application_Common_FileUpload.btnUpload_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String event

What could be the reason, any permission issue?
Any helps will be greatly appreciated.

Thanks,
RK
Posted

What does your web server have in it's "E:" drive? Anything? Nothing? Can you even tell?

The answer to the last question is "probably no".
Server code runs on the server, not the client. So it accesses server hardware, not client hardware. It worked on your development machine because the server and the client are the same machine - in production that is not the case.

The chances of any web host giving you access to an "E:" drove of any description are remote - you would need to talk to your hosting service.

But why would you want to create a temporary folder on a device that in the production server is likely to be removable anyway? Use the folder structure under your website, like you are supposed to!
 
Share this answer
 
Comments
♥…ЯҠ…♥ 22-Nov-13 4:34am    
Thanks for your reply Griff....!!!
OriginalGriff 22-Nov-13 4:39am    
You're welcome!
Friends,

Actually code is pointing to the drive that physically not exist in the server,its a virtual drive it seems.
So I changed the path to existing drive path.Now its working fine.

@Griff: I'll take your suggestion and 'll try to implement the same.Thanks again.

Thanks,
RK
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900