.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

WCF Streaming Mode and Concurrency

Posted By:      Posted Date: September 01, 2010    Points: 0   Category :WCF
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

View Complete Post

More Related Resource Links

How to turn off optimistic concurrency checking?


I have run into a problem with optimistic concurrency in my dynamic data application (where all relevant settings are at their default values); when I try to update or delete one of my tables, I see the following error:

 Exception type: ChangeConflictException
 Exception message: Row not found or changed.

I am the only user of my database at the moment, so I can guarantee that the data both exists and has not been changed outside the application!

Various forums have suggested that the way to deal with this is to set the column attributes so that the concurrency checking is disabled; i.e.

[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PropSurname", DbType="NVarChar(255)", UpdateCheck=UpdateCheck.Never)]

However, to do this manually through the Visual Studio designer will take me hours (I have a lot of tables) and if I then change the schema of one of the tables in the DB, won't I then have to do it all again?  I've tried editing the .designer.cs file directly but my changes are subsequently overwritten (as expected).

All suggestions gratefully received!

Ed Graham

Automatic Batch Printing in ReportViewer Remote Mode


Please help me, i have a properly working codes that is capable of the following:

1. Printing of Reports from ReportViewer without using the build-in print ICON in the actual ReportViewer. to view the working for the printing alone please click here.

2. Batch Printing by making a loop and placing a checkbox on the gridview where the needed paramerter (DataKeyNames ID) is retrieved then pass to the ReportViewer

This is my Code

foreach (GridViewRow row in GridView1.Rows)
            CheckBox chk = (CheckBox)row.FindControl("CheckBox2");
            if (chk.Checked)
                ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://TestServer/ReportServer");
                ReportViewer1.ServerReport.ReportPath = @"/Tavern/StudPaymentReport";
                ReportViewer1.ProcessingMode = ProcessingMode.Remote;
                ReportParameter[] rptParams = new ReportParameter[1];

                rptParams[0] = new ReportParameter("ClientID", GridView1.DataKeys[row.RowIndex].Value.ToString());


Thread Performance: Resource Contention Concurrency Profiling in Visual Studio 2010


Visual Studio 2010 includes new resource contention profiling features that help detect concurrency contention among threads. We walk through a profiling investigation to demonstrate how you can pinpoint and fix resource contention problems in your code.

Maxim Goldin

MSDN Magazine June 2010

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

Thread Diagnostics: Performance Tuning with The Concurrency Visualizer in Visual Studio 2010


Understanding performance bottlenecks in multithreaded apps used to require significant instrumentation and analysis by expert developers. The Concurrency Visualizer in Visual Studio 2010 significantly reduces the burden of parallel performance analysis.

Hazim Shafi

MSDN Magazine March 2010

Concurrent Affairs: Four Ways to Use the Concurrency Runtime in Your C++ Projects


This article describes how to integrate the new parallel computing libraries in the Visual Studio 2010 Beta into existing C++ projects. Based on four common scenarios, the column explains a few of the ways developers can use the APIs and classes that are part of the Parallel Pattern Library (PPL), Asynchronous Agents Library, and Concurrency Runtime.

Rick Molloy

MSDN Magazine October 2009

Synchronization Coverage: Code Coverage for Concurrency


As more and more multi-threaded software applications get developed, software development professionals need to adopt new tools, techniques and metrics that can deal with multi-threaded software. Synchronization coverage is a simple, practical way to do this and this article covers a prototype synchronization coverage tool for .NET, called Sync Cover.

Chris Dern, Roy Tan

MSDN Magazine September 2009

The Polyglot Programmer: Concurrency with Channels, Domains and Messages


Axum is not a general-purpose language like C# or VB, but one aimed squarely at the problem of concurrency, designed from the outset to be part of a suite of languages that collectively cooperate to solve a business problem.

Ted Neward

MSDN Magazine September 2009

Concurrency Hazards: Solving 11 Likely Problems In Your Multithreaded Code


Here we describe some of the more common challenges to concurrent programming and present advice for coping with them in your software.

Joe Duffy

MSDN Magazine October 2008

Concurrency: Tools And Techniques to Identify Concurrency Issues


Efficient parallel applications aren't born by merely running an old app on a parallel processor machine. Tuning needs to be done if you're to gain maximum benefit.

Rahul V. Patil and Boby George

MSDN Magazine June 2008

CONCURRENCY: Synchronization Primitives New To Windows Vista


Windows Vista has lots of goodies for native C++ developers including condition variables, slim reader/writer locks, and one-time initialization.

Robert Saccone and Alexander Taskov

MSDN Magazine June 2007

CLR Inside Out: Using concurrency for scalability


Because of the popularity of multiprocessor machines, many concurrency articles focus on how to make concurrency safe in your code. However, they don't deal with how to get concurrency into your code in the first place.

Joe Duffy

MSDN Magazine September 2006

Concurrent Affairs: Concurrency and Coordination Runtime


What can a robot-programming toolkit do for you? Read on and find out.

Jeffrey Richter

MSDN Magazine September 2006

Concurrency: What Every Dev Must Know About Multithreaded Apps


Multithreading offers lots of benefits, but it's not a technique you can employ willy nilly without first learning about all the potential pitfalls. To get you started, Vance Morrison covers multithreading and the shared memory threading model, race conditions and how concurrent access can break invariants. He also discusses how to use locks so you can understand the costs involved.

Vance Morrison

MSDN Magazine August 2005

Data Points: Handling Data Concurrency Using ADO.NET, Part 2


Enterprise development has been moving towards a discon-nected model in recent years and ADO. NET development is no exception. While the disconnected model of the ADO. NET DataSet offers great flexibility, that adaptability also means looser control over data updates than you get with a connected data access model.

John Papa

MSDN Magazine October 2004

Data Points: Handling Data Concurrency Using ADO.NET


One of the key features of the ADO. NET DataSet is that it can be a self-contained and disconnected data store. It can contain the schema and data from several rowsets in DataTable objects as well as information about how to relate the DataTable objects-all in memory.

John Papa

MSDN Magazine September 2004

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