0
IIS(7)阻止我从客户端(asp.net代码 - .NET 3.5)上传到我的服务器(共享点),因为该文件大于2GB。从我在网上的研究来看,这似乎是极限。绕过2GB上传限制IIS
那么我们该如何绕过这个限制呢?
客户端代码:
string urlFile = "xxxxx"
Stream input = Telechargeur.FileContent
Stream output = new FileStream(urlFile,FileMode.OpenOrCreate)
byte[] buffer = new byte[1024*1024*5]
int nbRead = -1
while((nbRead = input.Read(buffer,0,buffer.Length))>0)
{
output.Write(buffer,0,nbRead);
output.Flush();
}
input.Close();
output.Close();
Server代码:
string urlFile = "xxx"
Stream input = context.Request.InputStream; Stream output = new FileStream(urlFile,FileMode.OpenOrCreate)
byte[] buffer = new byte[1024*1024*5]
int nbRead = -1
while((nbRead = input.Read(buffer,0,buffer.Length))>0)
{
output.Write(buffer,0,nbRead);
output.Flush();
}
input.Close();
output.Close();
非常感谢
感谢您的回复。但就我而言,我将文件上传到服务器(在目录中)而不是在内容数据库中。所以,对我来说,问题是IIS不是SharePoint。任何想法? – TWEESTY
我对你的解决方案的体系结构有点困惑。你说你正在上传到SharePoint服务器,但没有上传到SharePoint。我不怀疑这是你以为你在做什么,但我怀疑SharePoint拦截了这个请求并拒绝了你的大量上传。 –
你说你正在上传到SharePoint服务器,但没有上传到SharePoint。我怀疑SharePoint拦截了该请求并拒绝了您的大量上传。 你是说你有一个SharePoint的虚拟目录和一个不同的这个任务?如果是这种情况,那么它可能会工作,因为SharePoint内部的WEBDAV实现不会拦截您的请求。如果您假定您可以利用SharePoint WEBDAV功能,那么您错了。 我会检查IIS日志,看看谁在处理你的请求。 –