Posts

Hosting a WCF Service

WCF is flexible because its services can be hosted in different types of applications. The following lists several common scenarios for hosting WCF services: Self-hosting Managed Windows Service IIS (II6 and IIS7) WAS

WCF contracts

WCF contracts define the behavior of WCF services. They are created in code by service developers, and are exposed to clients in the service metadata. The five types of contracts: Service Contracts Operation Contracts Data Contracts Message Contracts Fault Contracts Slide 23 § 1.A service contract defines the operations that a service supports, and maps to a portType in Web Service Description Language (WSDL). Service contracts are implemented as .NET Framework interfaces that are annotated with the ServiceContract attribute. [ServiceContract] public interface IMyContract { ...} 2.Operation contracts define the individual operations that a service supports and map to operations in WSDL. Operations are defined by adding methods to a Service Contract interface that is annotated with the OperationContract attribute. [OperationContract] void SomeOperation(); 3.Data contracts define how complex types are serialized when they are used in WCF s...

Windows Communication Foundation is...

Some Important points I have collected from MSDN site are: A part of the .NET Framework that provides a unified programming model for rapidly building service-oriented applications that communicate across the web and the enterprise. The global acceptance of Web services, which includes standard protocols for application-to-application communication, has changed software development. For example, the functions that Web services now provide include security, distributed transaction coordination, and reliable communication. The benefits of the changes in Web services should be reflected in the tools and technologies that developers use. Windows Communication Foundation (WCF) is designed to offer a manageable approach to distributed computing, broad interoperability, and direct support for service orientation. WCF simplifies development of connected applications through a new service-oriented programming model. WCF supports many styles of distributed application development by pr...

Xml Rss Blog Feed In Asp.Net

Image
Rss feed using XmlDataSource Control & Data bound control( here I had used datalist)

Method Overloading Example

public class AddingNumbers { /// /// Method Overloading /// /// Example : Console.WriteLine() & System.Math.Sign() /// overloading a method when you for some reason need a couple of methods that take different perameters, /// but conceptually do the same thing. /// /// /// /// public int Add(int a, int b) { return a + b; } public int Add(int a, int b, int c) { return a + b + c; } // Error'OOPS_Overloading.Program.AddingNumbers' already defines a member called 'Add' with the same parameter types C:\Documents and Settings\milindm\My Documents\Visual Studio 2005\Projects\OOPS_Overloading\OOPS_Overloading\Program.cs 21 27 OOPS_Overloading /* public string Add(int a, int b, int c) { return Convert.ToString...

Interface Example

Interface Example interface IPoint { // Property signatures: int x { get; set;} int y { get; set;} // method signature void print_points(); } class Point : IPoint { // Fields: private int _x; private int _y; // Constructor: public Point(int x, int y) { _x = x; _y = y; } // Property Implementation: public int x { get { return _x; } set { _x = value; } } public int y { get { return _y; } set { _y = value; } } // Method Implementation public void print_points() { Console.WriteLine("{0} {1}", _x, _y); } } class Program { /// /// Interface /// /// -...

Abstract Example

abstract class BaseClass // Abstract class { protected int _x = 100; protected int _y = 150; public abstract void AbstractMethod(); // Abstract method public abstract int X { get; } public abstract int Y { get; } } class Program : BaseClass { /// /// Abstract Class /// /// Use the abstract modifier in a method or property declaration to indicate that the method /// or property does not contain implementation. /// Use the abstract modifier in a class declaration to indicate that a class is intended only /// to be a base class of other classes. /// The abstract modifier can be used with classes, methods, properties, indexers, and events. /// /// -An abstract class cannot be instantiated. /// -An abstract class class cannot be inherited. /// -An abstract class may contain abstract methods and accessors. ...