Questions tagged [pushstreamcontent]

27 questions
1
vote
0 answers

Streaming video with ASP.NET WebAPI - Video seeking issue

I am using PushStreamContent to stream the video hosted as a BLOB asynchronously. Here's what I've done so far public HttpResponseMessage Get(string filename, string extension) { var video = new VideoStream(filename, extension); …
1
vote
2 answers

Pdfs inside zip file are corrupted

I am trying to make a zip file that contains pdfs. When i extract the zip, the pdfs are corrupted. I placed a watch on 'outputStream'. Here is the first exception 'outputStream.Length' threw an exception of type 'System.NotSupportedException' …
texas697
  • 5,609
  • 16
  • 65
  • 131
1
vote
1 answer

PushStreamContent vs Task Action?

Can anyone help, I wish to return a asynchronous Stream from asp.net web api and it appears there is more than one way of doing or I don't understand the difference. For example, you are able to do a PushStreamContent to a standard…
Martin
  • 23,844
  • 55
  • 201
  • 327
0
votes
0 answers

C# Stream.Write() runs into exception sometimes

I have a web service with a download functionality in an ApiController derived class. It reads a local file and passes it to a PushStreamContent, which cares for delivery to the requesting client. This works mostly fine, but sometimes I get an…
Nick
  • 472
  • 3
  • 18
0
votes
1 answer

Web API streaming images from buffer

For some reason i cannot get the below piece of code to work. I am trying to stream images to a browser over HTTP. [Route("api/v1/camera/live/stream")] [HttpGet] public HttpResponseMessage GetStream() { logger.Trace($"GET…
fly3rbug
  • 386
  • 3
  • 11
0
votes
1 answer

Sending live audio file to REST server using HttpClient and PushStreamContent

I need to stream audio data from the microphone to a REST server. I am working with a propriatery ASR engine and need to collect the data then stream it in real time in a single call to PostAsync Looking online, I found articles on…
gulu
  • 115
  • 8
0
votes
1 answer

Streaming Json - PushStreamContent with a Large Object

I need to stream a large object. I'm unable to figure out how to send it in chunks. The posted code works, however, stream.Flush() only gets called once. So, essentially I'm buffering the object - not good. How do I call stream.Flush() multiple…
Big Daddy
  • 5,160
  • 5
  • 46
  • 76
0
votes
0 answers

Possible Design Pattern for Business Scenario involving large result set from SQL Server stored procedure

Scenario: I have been given a task that involves creating a web API which will take a date parameter in the url like below: https://server/controllerrouting/payments?requestdate=08/13/2016 This api will call a stored procedure which uses the date…
Jason
  • 67
  • 12
0
votes
2 answers

completion port thread is leaking when client terminates the connection

I have a ASP.NET WebApi self-hosted application. HttpSelfHostConfiguration is configured as below HttpSelfHostConfiguration config = new HttpSelfHostConfiguration("http://0.0.0.0:54781") { TransferMode = TransferMode.StreamedResponse, …
0
votes
1 answer

Error converting PushStreamContent C# code to VB.Net WebAPI 2

I'm having some difficulty converting this C# code to a WebAPI 2 VB.Net project. Here's the original C# code [HttpGet] public HttpResponseMessage FromImages() { var imageStream = new ImageStream(); Func
0
votes
1 answer

while streaming video file, file is getting locked by another process using PushStreamContent..how to solve it

I am trying to stream video file . when i open the same video file in another tab of browser , i get the message "file is being used by another process" . if I use FileShare.ReadWrite in file.open method then error goes away but video doesn't play…
ana
  • 37
  • 1
  • 1
  • 11
0
votes
1 answer

PushStreamContent sends results back in chunks?

I am using the new PushStreamContent entity in MVC4 to stream notifications from my web server back to multiple listening iOS clients (they are using NSURLConnection). The messages being sent are JSON. When I send messages that are less than 1024…
lehn0058
  • 19,977
  • 15
  • 69
  • 109
1
2