Distribution of functionality Webservice using WCF

Slides:



Advertisements
Similar presentations
.NET Remoting in Delphi and C# Alain “Lino” Tadros President & CEO Falafel Software Inc. ComponentScience Inc. BORCON 2004.
Advertisements

.NET REMOTING CertSIG Tom Perkins. FUNDAMENTALS Distributed Applications Process A Process B Process C Objects can communicate across process boundaries.
.NET Remoting. .Net Remoting Replaces DCOM (Distributed Component Object Model – a proprietary Microsoft technology for communication among software components.
 Introduction  WCF Definition  WCF Architecture  Implementation  WCF Demo Overview.
Introduction to Web Services
Windows Communication Foundation and Web Services.
1 Advanced Programming Topics - II Objectives:  Background  Remoting  Types of remoting  Marshalling  Farmatters  Channels.
X.509 support in WCF Exploring support for X.509 Certificates in Microsoft’s Windows Communication Foundation Paul Cormier UCCS CS591 Fall 2009.
Adam Dille CS526 – Spring  Advances in Microsoft’s service offerings  ASMX vs. WCF  Latest WCF Improvements (.NET 4.0)  No in-depth study of.
The Microsoft Technical Roadshow 2006 Windows Communication Foundation Mike Taulty Developer & Platform Group Microsoft Ltd
Jon Flanders INT303. About Me  Jon Flanders –  Independent consultant/trainer  BizTalk MVP.
Getting Started with Windows Communication Foundation 4.5 Ed Jones, MCT, MCPD, MCTS Consultant RBA Inc.
Getting Started with WCF Windows Communication Foundation 4.0 Development Chapter 1.
Copyright ©2004 Virtusa Corporation | CONFIDENTIAL Introduction to Windows Communication Foundation Ruwan Wijesinghe.
[Title of the course] WCF
.NET Remoting Architecture. Slide 2 CITE 4420.NET Remoting Topics Remoting Boundaries Crossing the Boundaries Distributed Applications Marshalling Channels.
Agenda What Is the Windows Communication Foundation? How Does It Work? How Do I Use and Deploy It? Bindings Addresses Contracts How to host WCF services.
Microsoft Visual Studio 2010 Muhammad Zubair MS (FAST-NU) Experience: 5+ Years Contact:- Cell#:
Enabling Embedded Systems to access Internet Resources.
Distributed Communication via ASP.Net Web Services and.Net Remoting By Richard King.
CSCI 6962: Server-side Design and Programming Web Services.
1 UCN TB /IT 2011 Architecture Bindings –http –tcp –Msmq Serialization part 1 –With [DataContract] Running the services –In your own program –As a webservice.
Microsoft Visual Studio 2010 Muhammad Zubair MS (FAST-NU) Experience: 5+ Years Contact:- Cell#:
Intro to WCF From the beginning and uses Steve AppRochester.
Develop Distributed Applications using.NET Remoting Kate Gregory Regional Director Gregory Consulting Limited
.Net and Web Services Security CS795. Web Services A web application Does not have a user interface (as a traditional web application); instead, it exposes.
Random Logic l Forum.NET l Web Services Enhancements for Microsoft.NET (WSE) Forum.NET ● October 4th, 2006.
Developing Web Services Using ASP.NET and WSE That Interoperate with the Windows Communications Foundation ("Indigo") Mark Fussell COM432 Lead Program.
Mahesh Krishnan, Senior Consultant, Readify Slide 1.
Telerik Software Academy Web Services & Cloud.
ASP.NET Web Services.  A unit of managed code installed under IIS that can be remotely invoked using HTTP.
Week Six : Writing Web Services Aims: Creating and Consuming student’s first Web Services Learning Outcomes: Familiarity with VS.NET for creating and consuming.
Windows Communication Foundation David Anderson Independent Software Developer DCOM Productions.
Presentation 24: Windows Communication Foundation Introduced Objektorienteret Netværkskommunikation.
Agenda What Is the Windows Communication Foundation? How Does It Work? How Do I Use and Deploy It? Bindings Addresses Contracts How to host WCF services.
.NET Mobile Application Development XML Web Services.
The SOAP Story Martin Parry Developer & Platform Group Microsoft Ltd
07 | Advanced WCF Topics Bruno Terkaly | Technical Evangelist Bret Stateham | Technical Evangelist.
Shani Raba Team Leader & Software Architect
OE-NIK HP Advanced Programming WCF WCF SOAP service, host, client Exception handling (NOT required)
Introduction to Web Services Srinath Vasireddy Support Professional Developer Support Microsoft Corporation.
Nati Dobkin
Windows Communication Foundation and Web Services
Jim Fawcett CSE681 – SW Modeling & Analysis Spring 2005
Windows Communication Foundation
Segments Introduction: slides 2–7 10 minutes
4/12/2018 2:37 PM Windows Communication Foundation: Migration, interop, upgrade, and integration Risman Adnan ISV Lead, Microsoft Indonesia
 Pearson Education, Inc. All rights reserved.
Windows Communication Foundation
Windows Communication Foundation
.NET Remoting Priyanka Bharatula.
Window Communication Foundation
The Windows Communication Foundation Programming Model - Contracts
WCF.
Presentation 23 .NET Remoting Introduced
Windows Communication Foundation (WCF)
Matt Smouse CSE775 – Distributed Objects Spring 2003
Windows Communication Foundation and Web Services
Windows Communication Foundation
אפליקציות אסינכרוניות ל-Windows 10
MIX 09 12/9/2018 6:08 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Windows Communication Foundation (WCF)
Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta
Creating a Distributed System with Remote Procedure Calls and Web Services Ch.5 B.Ramamurthy 2/17/2019 B.Ramamurthy.
Chapter 42 Web Services.
The SOAP Story Martin Parry Developer & Platform Group Microsoft Ltd
Matt Smouse CSE775 – Distributed Objects Spring 2003
Jim Fawcett CSE791 – Distributed Objects Spring 2002
WCF Data Services and Silverlight
Matt Smouse CSE775 – Distributed Objects Spring 2003
Presentation transcript:

Distribution of functionality Webservice using WCF x

Different technology combined to form WCF. http://wcftutorial.net/Introduction-to-WCF.aspx

ASP.NET - 1 tier distribution http://msdn.microsoft.com/en-us/library/bb547119.aspx

ASP.NET - 2 tier distribution http://msdn.microsoft.com/en-us/library/bb547119.aspx

ASP.NET - n tier distribution http://msdn.microsoft.com/en-us/library/bb547119.aspx

Webservice - SOAP

Remoting – architecture Server and client are both .NET General architecture Proxy, stub, formatting and channel might be changed. Eg is a binary formatting, witch both is supported by TCP og HTTP, more effective than a textbased (XML) Server stub remoting formatter listener Client proxy remoting formatter channel

Remoting service - opportunities Server-activated object (SAO) also called ”Wellknown objects” Singleton: one and only one serverobject for all clients Threadproblem for object data SingleCall: One object per each method call The most easy solution, but less effective State might be keept by using files or database Client-activated object (CAO) Activated: One object per each client lifetime problems – Leasing not supported by IIS

Windows Communication Foundation Architecture http://msdn.microsoft.com/en-us/library/ms733128.aspx

Hosting WCF Side-by-Side with ASP.NET http://msdn.microsoft.com/en-us/library/aa702682.aspx

WCF support the 3 state scenarios Possibly also look for other info about these 3 scenarions on http://www.codeproject.com/KB/WCF/WCFInstance.aspx

WCF host & protocol Wcf might like remoting (singleton og singlecall) be integrated in an asp.net web project and be hosted by the IIS (Internet Information Server), where wcf also might get access for the ASP.NET Session, Application objects ect. Wcf might also be used without using the IIS as selfhosted with other protocols than http. Wcf also support eg json and not only soap, witch not is easy using the older ASP.NET webservices (asmx - technologi)

WCF data protocols WCF might also be configured to communicate by pure XML http://msdn.microsoft.com/en-us/library/bb547119.aspx

WCF setup Service is defined with a ServiceContract on the interface / class witch might be working as service-object, and methods that must be available external for clients must be defined as OperationContract’s Transport-objects must be defined as DataContract and field/property witch might be transported as data as DataMember’s.

Interface with the contract Normally you will define the contract on an interface but can also define this in the class, if you do not want an interface using System.ServiceModel.Web; // contains ServiceContract and OperationContract classes ……….. namespace MyNamespace { [ServiceContract] // Attribut on interfacet public interface IService1 [OperationContract] // Attribut on methods witch should be avaible by the service (on proxy) string GetData(int value); If you want to use session on service in a WcfServiceApplication (can not be used on ASP.NET - website under ISS) must ServiceContract'en added parameters and it looks like this : [ServiceContract(SessionMode = SessionMode.Required)]

Implementation of class for the contract using System.ServiceModel; ………. namespace MyNameSpace { //Default is creattion of a new service-object per each call, but it might be changed //[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)] // Default //[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)] // Remember to threadsafe //[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)] //Demand wsHttpBinding public class Service1 : IService1 public string GetData(int value) return string.Format("You entered: {0} <{1}>", value + count, s); } Connected markeup Service1.svc file, witch is giving the binding to service1: <%@ ServiceHost Language="C#" Debug="true" Service=“MyNameSpace.Service1" CodeBehind="Service1.svc.cs" %> Remark: PerSession på Wwbserver(IIS) demand wsHttpBinding witch demand adjusting in web.config The .SVC file could also be replaced by setting up endpoint information in web.config

Data transport objects (DTO) If transferring complex objects (not simple types, string and array) then these will be serialized - this should be done using a DataContract - previously you could use [Serializable] - on Web service would only be transferred public fields and public property , corresponding to an XML serialization. using System.Runtime.Serialization; [DataContract] // class could be serialized public class CompositeType { [DataMember] // field shoud be included when serialized bool _boolValue = true; string _stringValue = "Hello "; [DataMember] // property value should be included as data when serialized public int OneInt {private get; set;}

Data transport objecter (DTO) DataContract and DataMember When using these you might yourself include a referece to get the dll part of project