.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

problem in Transferring a large dataset to remote machine by using the NetTcpBinding

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :WCF
i am developing an WCF application, in which i have to transfer a large dataset to the remote machine!! for that im using nettcpbinding in WCF but i got this exception ' 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 '10:29:59.4140000'. at my sender side.   Sender/Client side code   // Object for sending to remote client using (_dpParameters = new DPParameters()) { _dpParameters.SequenceFieldName = "Sequence"; _dpParameters.Size = 10; _dpParameters.SubjectsForFiles = "S,Y,T"; _dpParameters.SubjectNames.Equals(SubjectNames); _dpParameters.FilePath = " E:\\Source\\Phospho.xml"; // this dataset can be in GBs but for testing me using jst 6.78mb DataSet ds = new DataSet(); ds.ReadXml(_dpParameters.FilePath); _dpParameters.Usd = ds.Tables[0]; } /// This is the binding settings NetTcpBinding tcpBinding = new NetTcpBinding(); tcpBinding.ReceiveTimeout = new TimeSpan(10, 30, 00); tcpBinding.SendTimeout = new TimeSpan(10, 30, 00); tcpBinding.MaxBufferSize.Equals(67108864); tcpBinding.MaxBufferPoolSize.Equals(67108864); tcpBinding.MaxReceivedMessageSize.E

View Complete Post

More Related Resource Links

Problem with remote connection using NetTcpBinding in WCF...



I try to implement a file storage and recovery system using WCF and NetTcpBinding, when I test the system locally (in the same sub-red) all work fine, but I can't communicate with my server application from another domain (not in the same sub-red). I was verify all the configuration for my machine firewall, router and application, but I not see the problem. My question is: Is possible that WCF or more precisely NetTcpBinding require extra configuration for remote access? It is my app.config file...

<?xml version="1.0"?>
    <compilation debug="true"/>
      <service behaviorConfiguration="BackUpBehavior"
        <endpoint address=""

problem in reading event logs of remote machine



I work on application which connects to remote machine and retrieves all event logs from it using EventLogReader and EventLogQuery classes.

I use the API EventLogReader.ReadEvent() for it. It works fine on all platforms except on Windows 7 machine. If I run my application on Windows 7 machine, EventLogReader.ReadEvent() throws an EventLogException with the error message - "The array bounds are invalid"

Have anyone faced this issue before? How I can overcome this problem and continue reading next event logs?

Please let me know.




Persist large dataset across ASP.NET pages. No database


Can anyone give me suggestions on how to implement the following requirement?

1. A online wizard (step-by step operation) processes user requests across several ASP.NET pages.  The session data is stored in memory until the user submits the request.  Once the request is submitted, a XML file is created and the data are passed to XML.

# Case Study: The parent page has a "select" button.  Click "select" will pop up a child page.  The users can select 1000+ items from a datagrid in the child page.  Once the user clicks "confirm", the selected items in the child page will be populated to the selected item gridveiw in the parent page.  The user can keep selecting more in the child page and the selected items will be appended to the gridview in the parent page.


- What's the best way to extract strings from a text file and convert to a dataset in memory and then present it in a datagrid in UI?

- What's the best way to persist and manipulate a large dataset across pages?  Session? or ViewState? Can it be accomplished by LINQ?

The app doesn't interact with a DB.  Once the request is submitted, it will convert the in memory data to a XML file.  What technology can be used to accomplished this?&nb

problem filling dataset


Hey guys,

Am using a dataset to get different data from a table depending on options selected. Sometimes this means the database returns no matching rows. However with this particular case it seems if there are no rows to put into the dataset I get an "Arithmetic overflow error converting nvarchar to data type numeric." error.

Code looks like this :

Dim saleSelect As String = "SELECT * FROM [sales] WHERE ([affected] LIKE '%' + @affected + '%') AND ([minVal] < @price) AND ([active] = @active)"
Dim saleCmd As SqlDataAdapter = New SqlDataAdapter(saleSelect, sqlConn)
saleCmd.SelectCommand.Parameters.AddWithValue("@affected", "," & id & ":")
saleCmd.SelectCommand.Parameters.AddWithValue("@price", price)
saleCmd.SelectCommand.Parameters.AddWithValue("@active", "True")
Dim saleDs As DataSet = New DataSet()

saleCmd.Fill(saleDs, "saleTbl") 'Error occurs here

The error occurs when SqlDataAdapter attemps to fill the Dataset.

All fields in the table are nvarchar except ofr [id] which is 'int' and [active] which is 'bit'

Any ideas?

Crystal Reports can grow fields with large amounts of text layout problem


A can grow field in the details section of a crystal report may have so much text that the section will be larger than the remaining space available on the page (the space below the previous record).  The section has vertical lines on it with Extend to bottom of section when printing set to true.  The section starts on a new page (and may continue on the following one).  I want it to start on the page where the last record was laid out, and continue to the new page without leaving a gap with vertical lines on it.  I'm using Crystal Reports 9 and I can't work out how to do it. Has anyone got a solution?

WCF issues sending large data - "An existing connection was forcibly closed by the remote host"

Hi Guys I have posted the following on www.asp.net but thought it might be productive posting here too.I have been pulling my hair out trying to fix an issue with sending data over WCF, I have read pretty much every THREAD on this forum regarding or similar to this issue without any successful solution.  I have a simple data object which has a [DataMember] with a data type of byte[]. I use this to send binary data from my web app as follows: Asp.net MVC website --> WCF Client (Has my Service References) --> My Services (MyServices.svc) --> Business/Data Tier Everything is being executed from within VS 2008 Pro.   Now I have successfully sent data up to 2.2MB, however it fails if i try and send a file such as 2.3MB or larger i get the following exceptions: General Exception Exception rethrown at [0]:    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)   at SoftApp.WCFClient.MyServiceReference.IMyService.Document_Save(DtoDocument dtoDocument, Int32 usercode)   at SoftApp.WCFClient.MyServiceReference.MyServiceClient.Document_Save(DtoDocument dtoDocument, Int32 usercode) in c:\dev\softapp\softapp.wcfclient\service references\myservicereference\refe

what is large and smal dataset

what is a large and small dataset /.. how can we say that it is large or small data set. can u xplain me clearly. and also send me some dat sets..my mail id is kalyan9029@gmail.com... thanking u .. kalyan

WCF Client (netTcpBinding) does not connect to remote DNS on Vista and Windows 7

Hi, WCF Client (netTcpBinding) does not connect to remote DNS on Vista and Windows 7. With other OS like XP and Windows 2003, client connects to remote DNS properly. I got the following exception. Same client works in Vista and Windows 7 if service is available in local network. Following are the exceptions: <Exception> <ExceptionType>System.ServiceModel.EndpointNotFoundException, System.ServiceModel, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType> <Message>No DNS entries exist for host icelive.theice.com.</Message> <StackTrace> at System.ServiceModel.Channels.DnsCache.Resolve(String hostName) at System.ServiceModel.Channels.SocketConnectionInitiator.GetIPAddresses(Uri uri) at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout) at System.ServiceModel.Channels.BufferedConnectionInitiator.Connect(Uri uri, TimeSpan timeout) at System.ServiceModel.Channels.TracingConnectionInitiator.Connect(Uri uri, TimeSpan timeout) at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout) at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.Comm

Upload large file via webservice problem in vb.net 1.1

Hi All, I am uploading large file via webservice using below my code in vb.net 1.1. Problem is vb.net 1.1 don't know Using Object loop. I would like to know any other loop similar Using loop to replace in vb.net 1.1Public Function UploadLargeFile(ByVal FileName As String, ByVal buffer As Byte(), ByVal Offset As Long) As Boolean Dim retVal As Boolean = False Try Dim FilePath As String = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory.ToString() & "\fpath\", FileName) If Offset = 0 Then File.Create(FilePath).Close() End If Using fs As New FileStream(FilePath, FileMode.Open, FileAccess.ReadWrite, FileShare.Read) fs.Seek(Offset, SeekOrigin.Begin) fs.Write(buffer, 0, buffer.Length) End Using retVal = True Catch ex As Exception Throw ex End Try Return retVal End Function  

Problem with .Net framework 4.0 on IIS 7 on Windows Server v2008 64 bit machine

Hi, I have installed .Net framework 4.0, i have added one application in default website, now when i brows the login page, it take some time and at the end displays nothing, in the event viewer in system log it says myApplicationName crashed.And also i get folllowing in event viewer Application LogLog Name:      ApplicationSource:        Application ErrorDate:          7/29/2010 11:39:31 AMEvent ID:      1000Task Category: (100)Level:         ErrorKeywords:      ClassicUser:          N/AComputer:      dev-appDescription:Faulting application name: w3wp.exe, version: 7.5.7600.16385, time stamp: 0x4a5bd0ebFaulting module name: clr.dll, version: 4.0.30319.1, time stamp: 0x4ba21eebException code: 0xc00000fdFault offset: 0x000000000000400cFaulting process id: 0xad8Faulting application start time: 0x01cb2ef990316804Faulting application path: c:\windows\system32\inetsrv\w3wp.exeFaulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dllReport Id: ce52c718-9aec-11df-8551-00155d701c03Event Xml:<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">  <System>  

Merge Replication and "Field size too large" problem

Hi,I have a single table database for tests configured on my server, I create another database using the same script that I use on my server on another server. I made a several inserts on the first database and I configure a merge replication between the two server and on the table article configure 2 integer columns to not be replicated and configure @pre_creation_cmd to none, because if I use another configuration on @pre_creation_cmd , when the snapshot applied it must recreated my table without the columns and I need then on another server. When I set @pre_creation_cmd  to none I need to create a rowguid column on the another server. My server is the Publisher and my another server is the publisher. I create the snapshot and when I sinconize the databases, the sinconization return that error:=================================================================================================The process could not bulk copy into table '"dbo"."CONSTS"'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20037)Get help: http://help/MSSQL_REPL20037 Field size too large (Source: MSSQLServer, Error number: 0)Get help: http://help/0 To obtain an error file with details on the errors encountered when initializing the subscribing table, execute the bcp command that appears below.  Consult the BOL for more information on the bcp utility and its supported options. (Source:

PERFMON: Cannot see SQL Server 2008 R2 64 bit instance counters from remote machine

Hi, I have 2 machines X and Y. I am using X machine to run perfmon which will remote connect to Y machine and collect the counters for Y machine. I am surprised to see that I am not able to see the counters for SQL Server 2008 R2 64 bit when I remote connect the perfmon on X machine to Y machine. However, when I directly log in to Y machine and open perfmon, I can see the counters for SQL Server 2008 R2 64 bit !! What is not allowing me to see those counters while connecting remotely? I have same adminstrator rights on both machine for my login and use same login details to log into both machines. Both machiens X and Y are in same network and same domain. Any help will be appreciated.

Sending Large Dataset to Webservice


Dear all,

I have one problem is that when i send large dataset containing byte array.. then webservice not respond well..

it shows error like underlying connection was closed...

I mark that when dataset size goes some large then only problem occurs otherwise it works well..

Please give me solution of how to send large dataset over web service...



Large File upload Problem.


I have problem with large upload files. few user complianing about it that either their file fails to upload or taking 20 to 30 mins.

I setup everything correct and i check on different machine its worked fine but only few customer out of 5000 complain it. any idea about if i can check at client machine?

i set my upload limit as 100mb and properly configured and i test it but one strange thing happen, when i try to upload group of files more then 100MB (but no individual file in the group more then 100), sharepoitn let it do and i can see 300MB group of files at once with explorer view.

my understanding when you set the limit it must be for individual or group of files. any thought?


thanks in advacne



i am at SharePoint administrator

Large Dataset Downloaded Before Rendering Report's First Page



I'm hoping to understand the behavior of SSRS a bit better in the following scenario (SSRS 2008).  A single matrix (tablix) exists on the report.  No other objects are on the report.  That matrix is populated with 1.1 million rows of data totaling about 200MB.  Why does SSRS download the entire dataset prior to rendering the report's first page or am I missing something here?

When previewing the report, the local .data file bloats to 200MB indicating all dataset rows are being returned.  The matrix does not contain any sorting, all cell "can grow" and "can shrink" properties are set to false, no expressions are used anywhere, and even the table's column data types from which the data is being pulled are appropriate.  In other words, I believe I've reduced storage and CPU needs while eliminating elements that add overhead when rendering a report.

The specific scenario here is a researcher previewing the first few pages of data then choosing to download the entire dataset.  MS documentation I've read refers to "soft page breaks" when rendering as HTML and left me with the impression that perhaps SSRS needs to know the entire height of the dataset before it'll slice the report into pages.  It's odd to me though that it needs to download 1.1 millions rows of data befor

Loading a Remote Page problem


I have an instance where I need to show a classic ASP page within an ASP.Net page. I didn't want to use an iframe for several reasons, but those aren't the issue here. I searched and searched and finally found some code that would let me do it, available here: http://www.mikesdotnetting.com/Article/49/How-to-read-a-remote-web-page-with-ASP.NET-2.0. I implemented the C# code and found that for the purpose of loading a plain HTML page it works just grand. But, when I try to load a Classic ASP page that way, I get a 500 Server error. The page that I am trying to load works just fine if I load it directly into a browser, or into an iframe, but not using this method.

I'd really like to know what is causing the error so that I can fix it. If I could get the whole error response that the page sends out it would be helpful. I'm just not well-versed in how these classes work deep inside. Should I be setting a user agent or some of the other header values? If so, what should they be set to and how? Any insight would be very appreciated. For completeness, my code follows.

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;

remote server problem ; index file cant find my layouts


hi !

i finally managed to finish my first dynamic application with Webmatrix and razor , everything works well locally.

But there are issues online.

i got an index file and a layout file.



in the index file , i've got the following code :

LayoutPage = Href("~/layouts/_layout.cshtml");

when i call the index page with


everything works

but when i try

http://mysite.com/test (without the / at the end )

the server throws this :

Server Error in '/test' Application.

The specified layout page 'test/layouts/_layout.cshtml' could not be found. The following paths have been used: ~/test/layouts/_layout.cshtml;~/Shared/test/layouts/_layout.cshtml;

it seems it cant find the layout file.

any suggestions ?

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