Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb.net 正常上载期间发生Tus.io WebException(服务器错误460)_Vb.net_Transloadit_Resume Upload - Fatal编程技术网

Vb.net 正常上载期间发生Tus.io WebException(服务器错误460)

Vb.net 正常上载期间发生Tus.io WebException(服务器错误460),vb.net,transloadit,resume-upload,Vb.net,Transloadit,Resume Upload,我正在使用Tus.io Resume-able文件上载库.Net客户端库将文件上载到web服务器 以下是代码片段: Dim testfile = My.Computer.FileSystem.GetFileInfo("..\..\test.pptx") Dim tc As New TusClient.TusClient() AddHandler tc.Uploading, Sub(bytesTransferred As Integer, bytesTotal As Integ

我正在使用Tus.io Resume-able文件上载库.Net客户端库将文件上载到web服务器

以下是代码片段:

 Dim testfile = My.Computer.FileSystem.GetFileInfo("..\..\test.pptx")

    Dim tc As New TusClient.TusClient()
    AddHandler tc.Uploading, Sub(bytesTransferred As Integer, bytesTotal As Integer)
                                 Dim perc As Decimal = bytesTransferred / bytesTotal * 100.0
                                 Console.WriteLine("Up {0:0.00}% {1} of {2}", perc, bytesTransferred, bytesTotal)
                             End Sub

    Dim fileURL = tc.Create(ServerURL, testfile)

    tc.Upload(fileURL, testfile)
上传功能适用于小型文件,例如500kb文件,但不适用于大小为3MB或更大的文件。根据上传事件给定的百分比传输100%数据后引发异常

例外:WebException

消息:远程服务器返回错误:460未知

响应内容:标头上载校验和与文件的校验和不匹配

状态:协议错误{7}

如果此处缺少任何必需的信息,请务必通知我。 任何解决方案或快速解决方案都将不胜感激。谢谢


另外,由于权限有限,我无法添加Tus.io标记。

Tus.io.NET客户端库包含一个校验和头,这导致客户端抛出此错误。现在最简单的解决方案是删除或注释掉下面的行,重新编译,然后就可以开始了

TusClient.cs
line 150: request.AddHeader("Upload-Checksum", "sha1 " + Convert.ToBase64String(sha1hash));