.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Streaming in WCF

Posted By:      Posted Date: September 18, 2010    Points: 0   Category :WCF
Hi..... I want to received large data using stream from wcf service. I am using basicHttpBinding,messageEncoding="Mtom" and transferMode = "Buffered". I have hosted my wcf service on iis 7.5 in windows 7 os. I have done all the settings and service and browse in Internet explorer successfully. But when i am giving the referance of this service to my wpf application, it will generate configuration code in app.config file and at there in binding configuration the transferMode="Buffered" and messageEncoding="text" is given. Plz help me. How can I recieve or pass data using stream. My Web.Config File is look like..... <?xml version="1.0"?> <configuration> <system.web> <compilation debug="true" targetFramework="4.0" /> </system.web> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="FileTransferServicesBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" me

View Complete Post

More Related Resource Links

IIS Smooth Streaming: Enhancing Silverlight Video Experiences with Contextual Data


Adaptive streaming addresses the problem of smooth content delivery and decoding. We walk you through the basics of IIS Smooth Streaming and demonstrate how you can manipulate audio, video and caption data in your own Silverlight projects.

Jit Ghosh

MSDN Magazine March 2010

Streaming Media Using Silverlight

One of the primary marketing hooks for Silverlight is its ability to stream media over the Web. Silverlight is able to do so using an embedded media player so that the client system does not need to have a player installed. This is a different approach from other media technologies. Most media technologies require that the client has a particular media player installed. With Silverlight, once the Silverlight plug-in is installed all Silverlight features are accessible, including media playback.

In an earlier module, we reviewed how to integrate multimedia into an ASP.NET AJAX application through the use of the ASP.NET Futures asp:Media control. The asp:Media control is an implementation of the Silverlight element.

How to use ASP.Net C# to integrate with video streaming?

Hi,          Can anyone tell me how to use ASP.Net C# to display video streaming on the ASP.Net Web? Another thing is the video can only run for one time. Do I need to use any plugin to develop it? How to use C# code to control the video? Please provide the details. Thanks Wesley 

WCF Streaming Mode and Concurrency

Hi, I have a WCF application that is used to upload and download files. I was using ChunkingChannel to upload and download files, but since it started giving issues, I decided to use streaming mode. After I changed to the streaming mode, I find that mu muti-threaded application that calls a method on this interface  acts like a single threaded application. Here are the details of the service configuration:   NetTcpBinding tcpBinding = new NetTcpBinding(); tcpBinding.TransferMode = TransferMode.Streamed; //May have large files tcpBinding.MaxReceivedMessageSize = 10737418240; //10 GB tcpBinding.MaxBufferPoolSize = 0; // Refer : http://stackoverflow.com/questions/325275/in-wcf-should-you-have-large-maxbufferpoolsize-value-for-large-messages //Set the timeouts and add an end point tcpBinding.OpenTimeout = new TimeSpan(0, 0, 30); tcpBinding.CloseTimeout = new TimeSpan(0, 0, 30); tcpBinding.SendTimeout = new TimeSpan(24, 0, 0); //So as to allow uploading huge files tcpBinding.ReceiveTimeout = new TimeSpan(24, 0, 0); //So as to allow uploading huge files ServiceEndpoint svcEndPoint = _serviceHost.AddServiceEndpoint( typeof (IMediaManagement), tcpBinding, "ep1" ); //Throttling System.ServiceModel.Description.ServiceThrottlingBehavior throttlingBehavior = new System.ServiceModel.Description.ServiceThrottli

Error 400 when hosting windows streaming service.

WCF, .NET 3.5:I'm sorry if this is redundant, but I'm having problems receiving error: 400 requests. My particular issue is this: If I select my service library within VS the library is test hosted and I can stream large files. My problem is getting a windows service configured to host this service library. I can transfer small files but larger ones are failing with the following stacktrace: <E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent"> <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system"> <EventID>262155</EventID> <Type>3</Type> <SubType Name="Error">0</SubType> <Level>2</Level> <TimeCreated SystemTime="2009-11-18T19:58:07.7808550Z" /> <Source Name="System.ServiceModel" /> <Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" /> <Execution ProcessName="ExtractorTestClient.vshost" ProcessID="10768" ThreadID="9" /> <Channel /> <Computer>MyComputer</Computer> </System> <ApplicationData> <TraceData> <DataItem> <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Error"> <TraceIdentifier>http://msdn.microsoft.com/en-US/library/Syste

WCF streaming upload file sends tiny chunks very slow

Hello WCF friends, please help!   I've a WCF Service on both servers IIS7/ISA/Win2008 and IIS6/Apache Reverse-Proxy/Win2003. And a client app that downloads and uploads files (approx. 10MB).   When downloading there are no problems. But if I upload a file on some client machines a have a strange problem. They have all DSL 5 or 6mbps bandwidth. On some client machines the upload finishes after a few seconds. And some client machines it sends tiny chunks with pauses (see screenshot) and takes much time (after a long time I terminate the process). Screenshot: http://i55.tinypic.com/2s79wu8.png   I tried hundred different configurations and search and read complete google with no success. I tried it on VirtualBox with Win7 as guest and host. With NAT I get this problem but with network bridge there is no problem!!! Our customer have this problem too, but I don't know what for network settings they have. WCF Service web.config: <configuration> <system.web> <httpRuntime maxRequestLength="2097151" executionTimeout="100" /> </system.web> <system.serviceModel> <services> <service behaviorConfiguration="MyFileServiceBehavior" name="MyWeb.Services.FileService"> <endpoint binding="basicHttpBinding" bindingConfiguration="HttpBinding_MTOM" bindingNa

streaming upload with WCF

I have a webservice that uses MTOM and Streams to upload a 28K document. It works fine when the client and server are on the same machine, but it fails, if they are on different machines.  The streaming download works fine.   I've tried this with both IIS 6.0 and IIS 5.1.   I've tried using the service tracing and IIS tracing (ETL files), but there are no errors in the trace files.   The IIS web log indicates a 400 HTTP error code with a windows error code (sc-win32-status) of 64: "The specified network name is no longer available."   The error returned from the .NET client is:   LesTest.Core.StreamTest.UploadContent : System.ServiceModel.CommunicationException : The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:04:59.9680000'.  ----> System.IO.IOException : Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.  ----> System.Net.Sockets.SocketException : An existing connection was forcibly closed by the remote host   Server stack trace:    at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.WebRequestOutputStream.Write(Byte[] buffer, Int32 offset, Int32 count)   at System.IO.BufferedStream.FlushWrite()   at System.IO.Buffe

Streaming and Mtom don't work

Hi, I'm pretty new to WCF. Most of the functions in my service don't require very much data or output much data, but there are two functions that do, so I'm trying to make 2 endpoints, one for regular buffered text (For the simple functions) and a streamed mtom endpoint. I added an endpoint and configured it in the client (Just using the default WCF test client right now) and it works if I have the second endpoint set to buffered text. As soon as I change it to Mtom or streaming or both, I get an error (I did update client config). With Both client and server configured for Mtom Buffered, I get this error: Content Type multipart/related; type="application/xop+xml";start="<http://tempuri.org/0>";boundary="uuid:8319e54d-3e4e-4272-ad7a-5d33da999d85+id=1";start-info="text/xml" was not supported by service http://localhost:56494/Service1.svc/str/.  The client and service bindings may be mismatched. Server stack trace:    at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)    at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)    at System.ServiceModel.Channels.RequestChannel.Request(Message message,

400 Bad Request when trying to send large file to service using basichttp streaming.


Hi All,


I am trying to send the large file (approx 1.5GB) to the WCF service for upload using basic http streaming.

I have increased all the timeouts and quotas in the server and client's config files to quite large values, but still I am getting Bad Request error on the client.


Also the Bad request message is returned always in 1 minute 30 seconds after sending the request to server.


What the most unusual thing is when I use Fiddler or Charles to debug communication, everything works fine. Is it something like fiddler is pinging the IIS or service and hence its not getting timeouted or like that?




Following are the details:

Server Config:


 <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />

Streaming in wcf with Mtom messageEncoding Type


Hi all,

I just want to know that Can I use Mtom as messageEncoding type with transferMode="Stream" for large data transfer.

I have try to use this thing but it is not working and throws me error(400 error).

Plz give me answer if any one knows.


Hiren Bharadwa....

Webcam streaming and recording in asp.net


Hi everyone I want to know about Webcam streaming over the web using c# and asp.net by using multiple cameras.I am unable to do this.So please help me out so that i can implement my application.I am able to stream by using single camera.

Simple Music Streaming Application

I came up with an idea for an application, where I can stream the top 50 latest songs on Last.Fm. Something similar to this - http://10k.aneventapart.com/Entry/419

I'm a noob with VB, so bare with me. I'm used to alot of front-end applications.

Before I start writing some of the code , I had some questions.

(1) - How can you position graphic's using VB? Can you position images and forms like you can with CSS? Using padding/margins?

(2) - Is an application like this hard to build in VB?

(3) - Can this be built in VB?

(4) - Would it be hard to intergrate Last.FM api into the application to stream the music?

Any help is appreciated, thank you.

Live audio-video streaming in an asp.net website using windows media encoder


The project is to provide the facility of providing live lectures in an intranet. So the bandwidth is not an issue. Also it means that I cannot use any internet streaming server like ustream (the project being limited to intranet).

I created a C# console application and successfully created a live stream using windows media encoder sdk. I was also able to capture the stream on another LAN PC in VLC player.

I want to know if I can implement this in my asp.net website. It should be something like this : The faculty visits the site and clicks on a start button on a webpage. This will start the live stream of the faculty. It will be received by the students on different computers by accessing the same website. Also, the faculty should be able to view himself on the webpage (just like in the windows media encoder predefined UI).

Is this possible to implement in the website? I mean both the facutly and the student will implement the same website. Also, the stream has to pass via a streaming server.

Or do I need to create a different application to start streaming and the students will view the stream from the website?

Also, which player do I embed to view the stream? Windows media player (I heard that it has issues with firefox) or the ever-available flash player? Will the flash player be able to capture the media encoder stream?

Please share a

Live audio-video streaming in an asp.net website


My project is to create a website that facilitates giving live lectures on intranet. Hence, the bandwidth is not an issue here.

Also, I have implemented some basic code of live streaming using windows media encoder SDK in a C# console application. I was able to view the streaming on another LAN PC in VLC player.

Now, how do I implement my code in the asp.net website? What I want is that in order to start the streaming (i.e., start the live lecture), the facutly just clicks on a button in a webpage. This will stream his movements to the students (via a server). Also, this will enable the facutly to view himself on the webpage.

Is this even possible? I mean it would be like : both the student and the faculty will access the same website. The interface to both of them will be different - one will start the stream and the other (student) will receive the stream.

Or will I have to create a different application to start the streaming? So it would be like the facutly will start that applicaiton to start the streaming and the students will access the stream throught the player embedded in the website.

Another question is : what player should I use to receive the stream (on the student side)? Windows Media Player (I heard that it has problems with firefox)? Or the ubiqutous flash plugin will succeed in capturing the media encoder stream?

Closing the browser window before file streaming




I have the following requirement in one of the applications I am working.

In an aspx page, that gets opened in new window from a hyperlink that is clicked in the main application. The newly opened window contains a button and on clicking on that button, an Excel file gets streamed to the user for download. If the file is created successfully for streaming, the newly opened window where the button is there should be closed automatically, otherwise, the window should stay with errror message gets displayed.


Can any one suggest how can this be achieved in ASP.Net?


Thank you,


SpeechRecognitionEngine.SetInputToAudioStream streaming realtime audio

In .NET 3.5, System.Speech.Recognition SpeechRecognitionEngine.SetInputToAudioStream Method doesn't seem to support real-time input.
I read a comment in MSDN "You may be led to believe that this allows you to stream audio to the engine in real-time, given that the other, similar methods look like they're used for pre-recorded streams, but this actually only supports a pre-recorded stream as well. The internal wrapper for the stream does not implement the ISpAudio interface required by SAPI to do real-time streaming, so this method cannot do real-time streaming."
I am developing a windows application and I want to provide real-time input stream from the network. How could I accomplish this? Could someone help me with a work-around?
Thank you. 

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend