.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 upload with WCF

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

View Complete Post

More Related Resource Links

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

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.

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.

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!!!!

ASP.Net Upload Image to MS Access Database

As you learnt from the previous articles to upload image to the SQL Database in ASP.Net 2.0 and stream that image into the memory to retrieve it from the database and display it on the web page. In this article you will learn how to upload images to the MS Access database in ASP.Net 2.0

First of all create an Access Database and place it in the App_Data folder of ASP.Net web site project. Then create a table "tblImg" with the following fields:

Strange Photo upload problem


I'm working project it's live on shared hosting

we'er uploading photos to a file on the server everything works fine the photo is resized renamed and sent to the folder

the upload page returns the thumbnail and the full size photo it's there all the photos have to be approved by an admin

twice now after they have been approved they disapear I checked the folder they are not there could there be anywhere

on the server they could get hung up before they go into the folder I have it setup so when you delete the data base entry it deletes the photo from the folder othe than that you need to open the folder and delete the photo this has hapened twice now I tried to recreate it with no luck

thaks for your help in advance

file upload in chunks or not buffering in memory before writing to disk?


What are the options for handling file uploads to reduce the memory footprint?  Is there a way to upload in chunks?  Is there a way to stream upload directly to disk instead of loading entire file in server memory?


upload file not working



iam using masterpage and ajax update panel, i have child page called  fileupload.aspx,i try to upload the file

but its not working , can i use updatepanel in child page , pls very urgent

looking forward for answer.

Upload a Print Screen?


Is it possible to Print Screen and then immediately Paste into a .NET app and upload to a server?  I'd like to skip the step of the user having to first paste the screen into an image program and save as a jpg, gif, etc.  Thanks!

Upload transparent PNG image


Hi everybody

I'm creating a website where it must  be able to upload, crop and resize images. This works until I use transparent PNG images. When I upload a transparent PNG, the transparency becomes black. I've searched the whole internet, but found no solution so far. Can someone help me? This is my code. I'm working with MVC 2.

			try {
				HttpPostedFileBase file = Request.Files["image"];
				file.SaveAs(Server.MapPath("/Uploads/" + file.FileName));

				ViewData["ImageLocation"] = "/Uploads/" + file.FileName;
				return View();
			catch (Exception exc) {
				return RedirectToAction("UploadImage");

How to upload image in Mobile Application?


I have requirement to upload the image in mobile Web application using asp.net. For this I have add mobile templates but regarding to image there is no any file upload control. Then I see one article and use the below code:

<mobile:DeviceSpecific ID="DeviceSpecific1" Runat="server">
                <input style="width: 389px; height: 22px" type="file" size="45" runat="server" id="FileUpload1">

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

Upload multiple files in asp.net

The article Upload multiple files in asp.net was added by habdulrauf on Friday, July 09, 2010.

Some times we need to allow user to upload as many files as he/she wants instead of fixed number of files.So here is the procedure to achieve this. Idea is taken from Joe's video.%@ Page Language="C#" AutoEventWireup="true" CodeFile

ASP.NET HTML Editor - Upload images

The article ASP.NET HTML Editor - Upload images was added by adarshtated on Tuesday, June 29, 2010.

In this article we are seen how to create a custom HTML Editor control to add image button in it.Create A Class-----------CustomEditor.cs------------------Add Name Spaceusing AjaxControlToolkit.HTMLEditor;namespace MyControls{ public class CustomEditor

file upload in Create User Wizard Created User event with UpdatePanel Tag wont work?



In my Create User Wizard1 Created User Wizard Event, I am collecting extra information from text boxes and allowing

the user to uplad a file.



I have put the Submit button within an Update Panel Tag but since I have done this it does not work.

Is there a way round it. In this situation would you use a trigger.?


<br />

  <asp:UpdatePanel ID="UpdatePanel2" runat="server">

  <asp:Button ID="StepNextButton" runat="server"  CommandName="MoveNext"  align="middle"
                                            Text="Submit my Profile" />

Attachment upload error on browser based InfoPath form



I am having an interesting problem with browser based InfoPath forms in SharePoint 2007.  For some reason the file attachment control is not working any more.  It was working fine in July, but now it will not allow file attachments over a few kb.  I tried a 34KB file and I get the error below, a 2KB file works fine.

Unable to connect to SQL Server session database. The connection string (server='SPDB', database='SharedServices1_DB') was returned by an instance of the IPartitionResolver type 'Microsoft.Office.Server.Administration.SqlSessionStateResolver, Microsoft.Office.Server, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c'.   at System.Web.SessionState.SqlSessionStateStore.ThrowSqlConnectionException(SqlConnection conn, Exception e)
   at System.Web.SessionState.SqlSessionStateStore.HandleInsertException(SqlConnection conn, Exception e, Boolean newItem, String id)
   at System.Web.SessionState.SqlSessionStateStore.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData item, Object lockId, Boolean newItem)
   at System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs)
   at System.Web.HttpApplication.SyncEven

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