在服务器中上传文件时设备未就绪错误。 [英] Device not ready error while uploading file in server.

查看:120
本文介绍了在服务器中上传文件时设备未就绪错误。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,



我试图通过asp.net中的文件上传控件上传一个doc文件,当时正在创建一个名为e:\\的临时文件夹\\ temp \documents \如果它不可用。

同样在我的本地机器上工作正常,但是当我尝试在我的服务器上运行它时,它被挂起了,我查看了日志文件错误记录此消息



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:

消息:设备尚未就绪。 - 位于System.Web.UI的System.Web.UI.WebControls.Button.OnClick(EventArgs e)的Application_Common_FileUpload.btnUpload_Click(Object sender,EventArgs e)。 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent中的WebControls.Button.RaisePostBackEvent(String eventArgument)(字符串事件

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



可能是什么原因,任何许可问题?

任何帮助将不胜感激。



谢谢,

RK


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

Thanks,
RK

推荐答案

您的网络服务器在其E:驱动器中有什么?什么?没有?你能说出来吗?



最后一个问题的答案是可能没有。

服务器代码在服务器上运行,而不是客户端。因此它访问服务器硬件,而不是客户端硬件。它适用于您的开发机器,因为服务器和客户端是同一台机器 - 在生产中并非如此。



任何网络主机提供访问权限的机会到任何描述的E:驱动器是远程的 - 您需要与您的托管服务交谈。



但是为什么要创建一个临时文件夹生产服务器中的设备可能是可移动的吗?使用您网站下的文件夹结构,就像您应该的那样!
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!


朋友,



实际上代码指向驱动器它在物理上不存在于服务器中,它似乎是一个虚拟驱动器。

所以我改变了现有驱动器路径的路径。现在工作正常。



@Griff:我会接受你的建议,并尝试实现同样的效果。谢谢。



谢谢,

RK
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


这篇关于在服务器中上传文件时设备未就绪错误。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆