.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

TCP File Transfer in WCF

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :WCF
Hi, I made a Windows Communication Foundation Application that sends

files via TCP from a client to a Service host. These files are converted in an

Array of bytes (byte[] file) and the client calls the service sending the byte

Array as a parameter. I configured the App.config file to support large size

messages (maxBufferSize="2147483647").

When I send a 150MB file the App runs OK


when I send a larger file (say 300MB) it gives me an error:

"Failed to allocate a managed memory buffer of 536870912 bytes. The amount of available memory may be low."

I don't know how to configure that buffer... it looks like that is the

Application buffer

Any ideas what could be???

PS: I have 1,5G of RAM so I think RAM is not a problem

View Complete Post

More Related Resource Links

Stale security timestamp error encountered in the middle of a large file transfer


I have two WCF services configured as Windows Services for both client and server that perform file transfers for DR replication. I'm using chunked streaming with a wsHttpBinding.

One of the files I am testing with is 58MByte, and after it has been going for 5 miinutes it throws a stale message exception

System.ServiceModel.Security.MessageSecurityException: The security timestamp is stale because its expiration time ('2010-10-07T20:36:25.322Z') is in the past. Current time is '2010-10-07T20:44:34.155Z' and allowed clock skew is '00:05:00'.

The problem is not clock skew because the two servers are within a minute of each other, and the transfer proceeds just fine until it reaches the 5 minute mark.  It's comparing the time at the beginning of the transfer to current time.  If got the receiveTimeOut set to 59 minutes.

I've seen posts about creating a custom binding to increase the clockSkew tolerance, but this seems to be more of a timeout issue.

Any ideas?



// get the stream from the remote server, copy it to a local file stream.

                                        stream1 = client.Get

How to transfer PDF file?


 PDF File Transfer is a terrific software which is very simple to use. You can transfer the most common-used eBook formats PDF and EPUB files between iPad and your PC directly without iTunes.

Besides a file transfer, PDF file transfer also allows you to customize the PDF and EPUB files by editing information, like name and author. This PDF files converter free download is compatible with various digital devices, including: iPad, iPod touch and iPhone versions, iPod touch2, iPod touch3, iPhone 3G, iPhone 3GS, iPhone 4 and iPad. Fast and convenient, PDF file transfer is a best choice to transfer PDF and EPUB files between iPad, PC and iTunes.

Add Software:Convert PDF Files to iPad ,Convert PDF Files to Flash

More info:Convert PDF Files ,PDF Files Converter Create PDF Files ,

File Transfer application in Windows Phone 7



I am trying to develop an application to do file transfer between 2 WIN Phone 7 through 3G.How can we accomplish this task?

Is there any msdn articles available for this?

Please help me..



Cannot transfer file using FTP Task



I try to upload a file using the "FTP task" from SSIS 2008. I have to upload the file on 3 FTPs, 2 of them are ok, and with the last I  get the following error "200 Type set to I.  200 PORT command successful.550 /myDirectory/myFile.xml: Access is denied."

The 3 FTPs have the same configuration (same login/password), my tasks were made on the same way...

I tried to copy/paste the file from the local directory to the FTP and it worked ! I really don't understand

why the package fails (either in a job or from BIDS).

Thank you for your help (and sorry for the mistakes, english is not my mother tongue...)


Write excel file on server to transfer to user, including colours


I want to export a large amount of data to an excel file (30,000 plus). This is no problem. The problem is that, one of the columns needs to be coloured green according to the data within it.

For example, the colour contains percentages, and when the percentage is over 70%, then the cell needs to be green.

I can do this easily using a Datagrid/Gridview. However, because of the amount of data, my server is crashing with a SystemOutOfMemory exception.

What I would like to do is use a tool to write the data to an excel file, and then transfer the file. Is this possible?

File Splitter in .Net

I love to do utility programs in .Net. And this is one of them. As I was playing with JSplit (a free file splitter program), I wondered if I could do it in .Net. The framework supports file operations like reading files in bytes and creating them. It is indeed easy to do file operations in .Net Basics on File operations

Upload Multiple File using JQuery in asp.net

In this article I have explained how to upload multiple files using file upload control. I have used jQuery plugin for uploading multiple files.

I have also explained how to check for file type, file maximum size limit using jQuery & also using server side validation code.

Creating Excel file from C#

I used below coding for create a excel sheet.I got from on web site.
In below coding there is no problem.Its create the excel file.If i run second time,its ask to overwrite the current excel file.If I said "Yes" then it ok ,but If I select cancel button,its generate the Error message.The exception is

Upload a File to a SharePoint Document Library - Part I

The following helper class demonstrates a few techniques that allow documents to be uploaded to a SharePoint document library programmatically without using the API or a custom web service. You don't need to specify a document library name, and it will create any folders specified in the URL as required. File meta data will be updated if any properties are passed.

HttpContext.Items and Server.Transfer/Execute

The problem was basically that when a Server.Transfer call was applied the script container (and also various ClientScriptProxy script embedding routines) would potentially fail to load up the specified scripts.

SmtpClient and Locked File Attachments

Got a note a couple of days ago from a client using one of my generic routines that wraps SmtpClient. Apparently whenever a file has been attached to a message and emailed with SmtpClient the file remains locked after the message has been sent. Oddly this particular issue hasn't cropped up before for me although these routines are in use in a number of applications I've built.

How to call an .exe file in .net

Sometimes a developer has to call an EXE from another EXE. While calling EXE there can be a requirement to pass parameter.

Using Conditional Split data Transfer in SSIS 2008

This article uses the Integration Services Conditional Split Data Transformation element to filter and transfer data from a set of flat text files to SQL Server database table. The concept can be easily extended to apply to any other source or destination such as Microsoft Excel. This scenario is useful in creating denormalized database tables in a reporting and analysis situation.

ClientAccessPolicy file in SharePoint 2010

I am upgrading my Silverlight demo code from the old beta to beta 2 and see that there are a few new considerations for the deployment of ClientAccessPolicy.xml files. In a previous post I demonstrated how to do this for SharePoint 2007. The heartburn that I get with that approach is any site collection owner or designer can drag the file into the site collection and open the site up to unwanted client access issues. In 2010 the virtual path provider no longer serves the files from the root of the site collection

Multi File Upload Using JQuery!

Everyone knows about the file upload in .NET. But the multi file upload is some what difficult in .NET. For that purpose we can have some AJAX or JQuery!. Jquery is the latest advanced version. It will give some animated upload. You can try it for your own!!!!

Transfering a file from Conputer to PDA

You can transfer one file at a time between your computer and another Bluetooth device by using the Bluetooth File Transfer Wizard. For example, you can transfer files between your computer and a mobile phone or a PDA. You can also transfer files between two computers that use Bluetooth.
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