Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Commented Issue: File handler is not released in form-data file upload scenario when put some stress on it. [176]

$
0
0
See the attached repro program.

In the test scenario, the client keep uploading file and the controller is expected to delete it once the read is finished. Occasionally the deletion will fail because some process is handling the file.
Comments: Hello, This bugfix doesn't seem to be deployed in at least one NuGet package containing the attached assembly : Microsoft.AspNet.WebApi.Client.5.1.1 The attached assembly (file version 5.1.20129) has contains the following inplementation of the function GetStream: public override Stream GetStream(HttpContent parent, HttpContentHeaders headers) { if (parent == null) { throw Error.ArgumentNull("parent"); } if (headers == null) { throw Error.ArgumentNull("headers"); } string text; try { string localFileName = this.GetLocalFileName(headers); text = Path.Combine(this._rootPath, Path.GetFileName(localFileName)); } catch (Exception innerException) { throw Error.InvalidOperation(innerException, Resources.MultipartStreamProviderInvalidLocalFileName, new object[0]); } MultipartFileData item = new MultipartFileData(headers, text); this._fileData.Add(item); return File.Create(text, this._bufferSize, FileOptions.Asynchronous); } Please note the last line. According to the commited fix (http://aspnetwebstack.codeplex.com/SourceControl/changeset/changes/bd530cd86f2e ) the content of that last line should be: return File.Create(text, this._bufferSize, FileOptions.Asynchronous | FileOptions.WriteThrough); Could you confirm this, and if so, where could i get the assembly actually containing the fix? Thanks in advance

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>