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

Post New Web Links

Confused about TCP packets

Posted By:      Posted Date: October 22, 2010    Points: 0   Category :.NET Framework
I have an application which acts as a server and send bytes from a file to client applications. No matter where I try on almost all machines the calculated speed is around 170k per second. On the client machines the packet size is always 1460, even though I have set my SendBufferSize, Recieve Buffersize to 10000. I feel as if I'm always going to be trapped with this speed regardless of Bandwidth. I have been testing out on Network machines and remotely distance ones. I understand that setting the Buffersize and the Send, receive size has a lot to do with the speed but what does that matter when the maximum I can send is 1460? Please Let me know if I'm Doing anything wrong or if there is more I need to do in order to reach higher speed. I cant imagine sending to a network PC at only 100-200kb per second.

View Complete Post

More Related Resource Links

Secure It: WS-Security and Remoting Channel Sinks Give Message-Level Security to Your SOAP Packets


As more organizations adopt XML-based Web Services, the need for message-level security has become evident. WS-Security, now supported in the Microsoft .NET Framework, addresses this need. Using the WS-Security framework, developers can implement channel sinks to intercept Remoting messages as they pass through the .NET Remoting infrastructure. The sink can read the message, change it, and pass it along. During this process, the message can be signed for added security. This article explains how to implement a Remoting channel sink that will modify the Remoting message by including a UserName token in the header, then sign the body using the token.

Neeraj Srivastava

MSDN Magazine November 2003

Formview + EditItemTemplate + Bind + PageLoad + Prerender = Confused


I am working with a formview edititemtemplate.  Currently in my page load, i have some stuff that would show or hide certain panels based on dropdownlist values.  These dropdown values get binded during page load.  I need to be able to change the values/dropdowns, without rebinding the old data, and updating the visibility of the panels based on predefined rules.

I have experimented with putting my formview.databind() in page load if isnotpostback, in prerender, in prerender if isnotpostback.   I have tried my rules (ex if ddlState.selectedvalue = "DE" then pnlDelaware.visible = "true") in the page load, and the page render.   I'm just not sure how to get the stars aligned here.

The closest i have come is having the databind in the pageload if notispostback, and the rules in the prerender.   However I get an error "dropdownlist has a SelectedValue which is invalid because it does not exist in the list of items.


Confused about Disk Alignment/ Partition Offset

I am all confused by disk alignment, partiton offset.Why do we need to calcualte offset which most of the articles talk about, This is from White Paper  Disk Partition Alignment Best Practices for SQL Server where its stressed that Partition_Offset ÷ Stripe_Unit_Size-- should be an integer 'The performance question here is usually not one of correlation per the formula, but whether the cluster size is the NTFS default of 4,096 bytes or has been explicitly defined at 64 KB, which is a best practice for SQL Server.' Also how do we calculate Stripe Unit Size for SAN. Thanks all for your replies !!  

Issues regarding sockets (stopping receiving packets).

Hello, I've created a server for my game, but for some unknown reason the server (most likely) stops receiving packets while the client still tries to send them. I've tried to use a couple examples from MSDN, but it still just stops receiving. This is what I think that happens: Client connects to server Server sends packets as response Client responds to those packets Server sends a lot of packets (one packet at a time) Client tries to send packet, but it kinda fails (it does send packets though!) Server waits (doesn't get any packet anymore) Client triggers timeout code on the server side and gets disconnected from the server Does anyone have an idea how and why this can happen? Here are the receive functions I use: BeginReceive (SocketInfo includes data such as amount of data to receive, state of packet (header or content) and the buffer) public void BeginReceive(SocketInfo socketInfo) { if (mDisconnected != 0) return; try { args = new SocketAsyncEventArgs(); args.Completed += (s, a) => EndReceive(a); args.UserToken = socketInfo; args.SetBuffer(socketInfo.DataBuffer, socketInfo.Index, socketInfo.DataBuffer.Length - socketInfo.Index); if (args != null) { try { if (!Socket.ReceiveAsync(args)) EndReceive(args); } catch (ObjectDisposedException) { Disconnect(); return; }

Still confused :(


I have downloaded Visual Studio 2010 (Luckily my university provides it for free) andI tried it and it seems to be good. However, my problem is that I am still confused which programming language should I learn for web development regardless the IDE. My options are ASP.NET and PHP.
Sometimes I would like to go with PHP because you do not need to specific IDE to write code and it's cheaper for hosting,etc. And sometimes when I look at the big websites I found most of them use ASP.NET and this increase the confusion for me Cry.
Please as an expert, could you provide me a good advice. (Please be subjective in your advice, remember it's an advice)

Confused about membership provider and what else I need to use..


I am creating some inhouse web applications(MVC2) for our employees to use..

We currently have a separate backend system that stores login information, session ids(which get stored in browser cookies), ect..

I am trying to create a custom membership provider to work with all of this..

I have seen some code samples where people just set a reference to and create an instance of their custom membership provider and then just executing the functions wherever needed (Eg. ValidateUser).. If thats correct then whats the point of inheriting the membership provider class, why not just create your own class to do what you need with your own method names.. Also why does the membership provider need to be referenced in the web.config file if its just a class that is used from the controller????

Is there something im missing here or maybe more that I need to do??

Also is it possible to make my custom membership provider global so that any web application we create will be able to use it without having the library bundled with each application??

Confused about MVVM


I am porting an old WinForms application to WPF and using the MVVM pattern. I have not written any code using this pattern previously. So I am confused and have a fairly basic questsion

In the Old app, I had a MainWindow and many tabs. The tabs all used objects that were defined in the MainWindow. So the functionality of each tab could be applied to these "global" objects and all was good. One tab provided functionality that did a transform on an object. Another provided analysis on the current state of the same object and so on.

Now, with MVVM, I am using a similar UI model - MainWindow with many tabs where each tab has it's own viewModel and view. (don't want to change the UI on the users). My question is - where do I put the "global" objects? My model contains the classes definition for these objects. But where is the instantiation done? in which class?

Am I to create a global model? one that represents the app at runtime?  If so, how does each view/viewModel know to load the right instance of the "global" object so that it can then wrap appropriate parts in ObservableCollections etc?

Am I making sense or should I just get some shut eye tonight and RTFM tomorrow




.NET Framework 4, I'am confused about supported XP editions



according to this msdn entry (http://msdn.microsoft.com/en-us/library/8z6watww.aspx ) .NET Framework 4.0 doesn't support Windows XP Media Center, Starter, Reduced Media and Tablet PC editions, but the official download page says it supports Windows XP SP3.

To my understanding at least the Media Center and Table PC editions are just extended Windows XP Professional versions.

Can someone tell me the truth? Has someone successfully installed .NET Framework 4.0 on any of these XP versions?

Best regards, Cubicle

EMG, MLG, and WIPRO..... Confused and no enough answers on Google Search


Plz i need the What this words means?  All I know MLG is short for Microsoft E-Learning Gateway and these three shorts are somhow linked to SharePoint!!

I know my question is a poor one but I really drawning for this info.


Best Regards,

Mostafa Zayed

EMG, MLG, and WIPRO..... Confused and no enough answers on Google Search


Plz, What this words means EMG,MLG, and WIPRO?  All I know MLG is short for Microsoft E-Learning Gateway and these three shorts are somhow linked to SharePoint or they use SharePoint within thier implementation!!

I know my question is a poor one but I really drawning for this info.


Best Regards,

Mostafa Zayed

Confused by passing by reference


On the client I want to instantiate an instance of an entity (that has a datacontract on the server side), send it to the server, let the server modify it in some way, and send it back. I'm talking about using standard-issue, ordinary WCF objects with DataContract/DataMember attributes.

The only way I could figure out to accomplish the above is to pass the object by reference.  Is there another way?

In researching this, I found the links below, one of which says it is not possible to pass by ref (yes I realize we are passing a copy, but it is the result I'm interested in.  Perhaps that is what the author is alluding to??).

Sorry for having to ask this but I'm confused (again).




Server code:

Confused about SMTP setup on Server 2008

I can't seem to find the basic SMTP configuration.  How can I configure the basic SMTP services.  The SMTP service is there and the features list shows that SMTP is installed.  I can't find the MMC tool for it.

adam hodge (MSFT) 

Repository Pattern Question. Confused need help.



I been reading Repository Pattern implementation for MVC 2. I am confused due to few things.

Simple Implementation is below.

Tables : Contact has One to Many relation with AssignToCategories
1 - Contacts
2 - AssignToCategories

I have in Model folder


My Questions

1 - We can use ContactRepository directly in View. Why we need IContactRepository for. As long as I know its for Test. Am I right?. If not than whats the purpose.
2 - I have seen ContactService, IContactService. As for as I know its for Business logic. Is there more to it?
3 - Contact has relation to AssignToCategories. Should I put all the data reterival logic within ContactRepository or this AssignToCategories need to have separate Repository and Interface.

I need some help with the concept. Though I have done alot of reading but still confused.

There is one layer called Pipe and filter. Whats the used of that?


Upgraded to 4.0, get error on ajax, very confused, please help


 I have a custom control which worked fine under 2.0, now I upgrade to 4.0, I get error.

By debug, I found the error happens in MicrosoftAjax.debug.js file.

/ Name:        MicrosoftAjax.debug.js
// Assembly:    AjaxControlToolkit
// Version:     4.1.40412.0
// FileVersion: 4.1.40412.2
// (c) 2010 CodePlex Foundation

It happens in the below code

 var finder = type === "#" ? Sys._getById : Sys._getByClass;
                            if (context) {
                                foreach(context, function(node) {
                                    if (node.nodeType === 1) {

Confused over whether to use WorkflowApplication or WorkflowServiceHost for wcf activated long runni


I appear to want the best of both worlds between hosting a workflow using WorkflowApplication or WorkflowServiceHost.

I want to instantiate the same workflow multiple times for different datasets via wcf; which leans towards using a WorkflowServiceHost.

However I want the ability to pause a workflow, then resume at some later date once some condition has been met; all the examples for this use the WorkflowApplication type for hosting.

I might be taking the wrong approach, but my idea is for some client to make a service call passing in an id that will also be used as a message correlation key.

The workflow will include a number of validation steps, any of which could fail. Upon failure, I want the service to pause, whilst the underlying (data) issue is fixed.

Once fixed, the client makes the same call to the service and workflow resumes.



First .NET Web Service - Confused about templates



I am a ColdFusion developer that is trying to learn about integrating CF with .NET.  This has me stumped. 

In the book I am using there is a directive to use Visual Studio .NET to create a web service project using C# by clicking on the template icon for "ASP.NET Web Service". 

On my machine I now have:

  • SQL Server 2008 Developer Edition
  • Microsoft Visual Studio 2008 (which downloaded and installed with SQL Server 2008)
  • Visual C# 2010 Express
  • Visual Web Developer 2010 Express
  • Visual Basic 2010 Express
  • All .NET Frameworks up to 4

I still cannot find a template called "ASP.NET Web Service". So, from the New Project window in Visual Studio 2008 I choose:

  • New Project
  • Other Project Types
  • Visual Studio Solutions
  • Search Online Templates
  • Find link called "ASP.NET Web Service Template"

.... but it's NOT a template. It's a description of the template and all the files that are created when you use that template.  I want the template, not information about it.

It looks like in my Visual Studio 2008 the templates are ONLY SQL-related templates.  Nothing to do with Web Services or Web Sites, etc.

Can someone tell me how to get thes

Confused about architecture - n-tier, MVC, MVP, etc? Please help a newbie!



For years I have been an ignorant (as in uneducated, as opposed to stupid or objectionable) programmer, and have followed the very common "throw it all in the code behind" anti-pattern. I have recently been reading up on n-tier architecture, MVC, MVP, TDD and loads of other things with cute TLAs (three letter abbreviations) until my head is spinning faster than a hyperactive electron listening to Saturday Night Fever!

Anyway, I'm trying to work out the best approach to take for ASP.NET sites. I want a clean separation of layers, partly so I can write test suites as I go along, and partly so I can change the presentation layer without affecting the rest of the system.

Can anyone help me work out which route to take? Microsoft seem very keen on pushing MVC, and there certainly seems to be a lot of support for it, but reading around outside of the MS community (and some parts within), it looks to me like people are favouring MVP over MVC for web apps. I don't claim to understand either deeply enough to be able to follow the arguments for and against, and am worried about investing too much time in one, only to find out that I should have gone down the other route.

I don't know if it makes any difference, but I use the entity framework for data access, so whatever choice I make has to fit well with that.


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