什么是文件名长度使用ASP.NET FileUpload控件时“隐藏”的限制? [英] What is the 'hidden' limit on file name length when using an ASP.NET FileUpload control?
问题描述
我有一个FileUpload控件,当我选择文件
I have a FileUpload control, and when I select the file
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.txt
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.txt'
,(我可以在Windows中创建没有问题),这是说,它不具有一个文件时,我回发
, (which I can create in Windows with no problem), it is saying that it does not have a file when I postback.
它工作正常的更小的文件名。这是怎么回事?
It works fine for smaller file names. What's going on?
推荐答案
如果您尝试将文件保存在文件夹中在服务器端(类似于C一个临时文件夹可能发生这种情况:\\ Documents和Settings \\布拉布拉.. \\ TEMP)和超过255个字符的限制MAX_PATH而客户端上的文件位于根没有达到MAX_PATH。
This could happen if you try to save the file in a folder on the server side (like a temp folder in c:\documents and settings\blabla...\temp) and exceed the MAX_PATH limit of 255 characters while on the client the file is located at the root and MAX_PATH is not reached.
这篇关于什么是文件名长度使用ASP.NET FileUpload控件时“隐藏”的限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!