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

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

WCF P2P: How To Design State Sharing in a Peer Network

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

Learn how you can peer-enable business applications by allowing them to share state in a serverless peer network.

Kevin Hoffman

MSDN Magazine July 2008

View Complete Post

More Related Resource Links

Design Patterns - Using the State Pattern in C#

What is the State Pattern?

The State Pattern is a behavioral pattern that can be used to alter the behavior of an object at run time. As the state of an object changes, the functionality of the object can change drastically. This change of behavior is hidden from the Client and the Client interfaces with a wrapper object known as the Context. The State Pattern is a dynamic version of the Strategy Pattern.

sharing website(asp.net) mdf database on a network in multiuser environment


simple question:


I have create a web site in visual studio with form user authentication.  Thats create a mdf database in this path:



thats use Sql server


i would like to access this database with c# form application on a network with multi-user.

if i change the drive letter of the path above to f:\ (mapped drive) or \\server\c\, i got this message


System.Data.SqlClient.SqlException: The file "h:\Inetpub\wwwroot\website\App_Data\ASPNETDB.MDF" is on a network path that is not supported for database files.
An attempt to attach an auto-named database for file h:\Inetpub\wwwroot\website\App_Data\ASPNETDB.MDF failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.


i read that

Peer-to-Peer design for reslient application design


In SQL 2008 R2, I understand that Peer-to-Peer replication can provide a unique opportunity.

I'm currently looking to understand if this capability feeds into an application architecture I'm beginning to research a concept for.

My firm is a medical device manufacturer. We are looking to build a new medical device gateway. This gateway is pretty simple in that medical devices connect to the gateway to transfer device operation information (little (1000 character) XML formatted messages, several hundred messages per minute).

In our legacy design, we have N+1 application servers, load balanced, that the medical devices communicate to. These gateway application servers send and receive XML messages to the device, and persist the messages into an Oracle 10g database (boo hiss!)

The current architecture is redundant at the application server level with load balancing, but the DB is the single point of failure.

In drawing up a concept of a new gateway, I was thinking of a design where each node of the application gateway consisted of the application services for device communications as well as MS SQL 2008 R2 Std  configured as peer to peer replication between each node (two, three, or maybe four nodes max).

So my thought was to use load balancing to have a device connect to a node in my new gateway, transmit the XML statu

Profile network state by using PerformanceCounter component

I'm trying to get the network usage of my program by using PerformanceCounter component,but i met a problem .
I set the "CategoryName" property to ".NET CLR Networking" and "CounterName" property to "Bytes Received".If i start the program I'll get an exception
"Category '.NET CLR Networking' is marked as multi-instance. Performance counters in this category can only be created with instance names."
but there is no instance in this category(at least I think so) .
please help me,thanks

Abstract Factory Design in C# , Vb.NET

Provide an interface for creating families of related or dependent objects without specifying their concrete classes

Prototype Design Pattern in C#. Vb.NET

Specify the kind of objects to create using a prototypical instance, and create new objects by copying this prototype

Adapter Design Pattern in C#, VB.NET

Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces.

Singleton Design Pattern in C#, Vb.NET

Ensure a class has only one instance and provide a global point of access to it.

Truly Understanding View State

This article provides a detailed understanding of the ViewState.

Solidify Your C# Application Architecture with Design Patterns

design pattern can solve many problems by providing a framework for building an application. Design patterns, which make the design process cleaner and more efficient, are especially well-suited for use in C# development because it is an object-oriented language. Existing design patterns make good templates for your objects, allowing you to build software faster. This article describes several popular design patterns you can use in your own applications, including the singleton, the decorator, the composite, and the state classes, which can improve the extensibility of your applications and the reuse of your objects.

What Are Design Patterns and Do I Need Them?

Software professionals may be familiar with the term "Design Patterns," but many have no idea of where they come from and what they truly are. Consequently, some do not see the value and benefits design patterns bring to the software development process, especially in the areas of maintenance and code reuse.

Design Patterns for .NET

It is not the intent of the Design Pattern Series to focus on providing a theoretical knowledge dump of all there is to know about design patterns. There are many books that do that already. Instead, this series will focus on providing lots of practical examples. However, there will be some theory to help address important points concerning design patterns. I use the theory of design patterns mostly as a guide and instead make references to good design pattern books for more detail explanation.

Singleton Design Pattern in Asp.net using C#

When we want to make a only one instance of a class and also making sure that there is a global access point to that object then the design pattern we user is called Singleton. The pattern ensures that the class is instantiated only once and that all requests are directed to that one and only object.

The Factory Design Pattern

Software architects generally think in terms of high-level abstractions rather than low-level programming details. Representing a system in terms of high-level abstractions promotes understanding of the system and reduces its perceived complexity. One such set of abstractions is software design patterns. They have been successfully applied in the past to simplify and solve recurring problems in software design.

Abstract Factory Design Pattern (Sample in C# and VB .NET)

An abstract factory provides an interface for creating families of related objects without specifying their concrete classes. Sometimes one wants to construct an instance of one of a suite of classes, deciding between the classes at the time of instantiation. In order to avoid duplicating the decision making everywhere an instance is created, we need a mechanism for creating instances of related classes without necessarily knowing which will be instantiated.

GOF Creational Design Patterns with C#

The GOF design patterns help address the following challenges :

design ready to accommodate change & growth

design flexible systems which come ready to handle reconfiguration and run time tailoring

code in manner to facilitate reuse during the development and extension phases ... ie. both external and internal reuse, so that we are rewarded by efficiencies as the project progresses, coming from investments made earlier in the project.

implement change in a way that doesn't overly shorten the system's useful lifespan
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