Sie sind auf Seite 1von 12

1 KCG College of Technology,Chennai-97 Information Technology Unit-V Notes CS20 ! " C# an$ %Net &rame'or() T*+ ,-.

K /0estions 1 -ns'ers 2) What are the advantages of Application Domains? -$5antages of -223omains

Application Domains Remoting Leasing and Sponsorship .NET Coding Design Guidelines Assemblies Security Application Development eb Services !uilding an "#L eb Service eb Service Client SDL and S$A% eb Service &ith Comple' Data Types eb Service %er(ormance. (1) What are application Domains? The -223omain is one o( the )ey architectural (eatures supporting the managed environment. .NET 2artitions a process into one or more logical areas in &hich assemblies e'ecute. These logical areas are -223omains. A process may contain more than one AppDomain and an AppDomain may contain one or more assem4lies. A de(ault AppDomain is created &hen the Common Language Runtime *CLR+ initiali,es.

Co$e Isolation. AppDomains institute a level o( (ault isolation that prevents a code (ailure in one AppDomain (rom causing another AppDomain to crash. Code separation is done in t&o &aysby preventing an AppDomain (rom directly re(erencing ob.ects in another AppDomain/ by having each AppDomain load and maintain its o&n copy o( )ey assemblies that allo& it to run independently. 6erformance. 0mplementing an application to run in multiple AppDomains can produce better per(ormance than a comparable design that relies on multiple processes. Sec0rity% An AppDomain presents a security boundary bet&een its contained resources and assemblies attempting to access them. To cross this boundary/ an outside assembly must rely on remoting / &hich re1uires cooperation bet&een the AppDomains.

3) What is remoting?

.emoting
At its core / remoting is as a &ay to permit applications in separate AppDomains to communicate and e'change data. This is usually characteri,ed as a client2server relationship. The &ay in &hich this agreement bet&een client and server is implemented is &hat remoting is all about. The physical pro'imity o( the AppDomains does not matter- They may be in the same

2 process/ in di((erent processes/ or on di((erent machines on di((erent continents. 7+ *hat are 2ro8ies;
6ro8ies

5) Explain briefly remoting Architecture. .emoting -rchitect0re hen a client attempts to in5o(e a metho$ on a remote o47ect/ its call passes through several layers on the client side. The (irst o( these is a 2ro8y 3an abstract class that has the same inter(ace as the remote ob.ect it represents. The channel is responsible (or transporting the re1uest to the remote ob.ect. The channel consists o( a (ormatter sin) that seriali,es the re1uest into a stream and a client transport sin) that actually transmits the re1uest to a port on the server. $n the ser5er si$e/ the process is reversed / as the ser5er trans2ort sin( receives the message and sends it up the chain. A(ter the (ormatter rebuilds the re1uest (rom the stream/ .NET creates the ob.ect on the server and e'ecutes the re1uested method. 4igure 5626 illustrates the client2server roles in a remoting architecture. 0ts three )ey components are - 2ro8ies, formatter classes, an$ channel classes%
&ig0re ! - % 9igh-le5el 5ie' of %N:T remoting architect0re

hen a client attempts to communicate &ith a remote o47ect/ its re(erence to the ob.ect is actually handled by an interme$iary )no&n as a 2ro8y . 4or .NET remoting/ there are t&o types o( pro'ies- a trans2arent 2ro8y that the client communicates &ith directly/ and a real 2ro8y that ta)es the client re1uest and (or&ards it to the remote ob.ect. ) What are the types of remoting? Ty2es of .emoting The parameters in a C8 method may be 2asse$ 4y 5al0e or 4y reference . Remoting uses the same concept to permit a client to access ob.ects. hen a client gets an actual copy o( the ob.ect/ it is re(erred to as marshaling 4y 5al0e " ,<V ) 9 &hen the client gets only a re(erence to the remote ob.ect/ it is re(erred to as marshaling 4y reference " ,<. ) .
,arshaling 4y Val0e

hen an ob.ect is marshaled by value/ the client receives a copy o( the ob.ect in its o&n application domain. 0t can then &or) &ith the ob.ect locally and has no need (or a pro'y. :o&ever/ (or ob.ects that are designed to run on a client as easily as on a server/ and are called (re1uently/ this can reduce the overhead o( calls to the server.
,arshaling 4y .eference

#arshaling by re(erence *#!R+ occurs &hen a client ma)es a call on an ob.ect running on a remote server. The call is marshaled to the server by the pro'y/ and the results o( the call are then marshaled bac) to the client.

3 co$e access3not 0ser access. Conceptually/ the model is 1uite simple. !e(ore an assem4ly or com2onent &ithin an assem4ly may access system reso0rces *(iles/ the registry/ event log/ and others+/ the CLR chec)s to ensure that it has 2ermission to do so. 0t does this by collecting e5i$ence a4o0t the assem4ly3&here is it located and its content. !ased on this evidence/ it grants the assembly certain 2ermissions to access reso0rces and per(orm operations. 4igure 5;26 illustrates the )ey elements used to administer security.
&ig0re !=- % -n assem4ly is matche$ 'ith co$e gro02s 'hose e5i$ence it satisfies

8) What are the issues and steps involved in producing deliverable .!E" soft#are? The issues and steps involved in producing a $eli5era4le %N:T soft'are 2ro$0ct invovlves 4rea(ing the 2rocess $o'n into the three categories sho&n in 4igure 5;25co$e refinement/ &hich loo)s at ho& code is tested against 4est 2ractice r0les9 co$e sec0rity/ &hich ensures that code is accessed only by other code that has 2ermission to do so9 and co$e $e2loyment/ &hich loo)s at ho& an application or component is pac)aged and made available (or deployment.
&ig0re !=-!% 3eli5era4le soft'are sho0l$ meet co$ing stan$ar$s, 4e sec0re, an$ 4e easily $e2loye$

hen an assem4ly is loaded/ the C>. gathers its e5i$ence and attempts to match it &ith co$e gro02s &hose evidence it satis(ies. A co$e gro02 is a 4in$ing bet&een a set of 2ermissions and a single ty2e of e5i$ence. .NET provides prede(ined evidence/ permissions/ code groups/ and security policies3a collection o( code groups. 8) What are the predefined evidence provided by %&'? 9) Explain briefly .!E" $ecurity features. The Common Language Runtime provides seven prede(ined types o( evidence. They are re(erred to by names used in the security administrative tools Strong Name Strong Name

Sec0rity
The centerpiece o( %N:T sec0rity is the Co$e -ccess Sec0rity mo$el. 0t based on

. An assembly &ith a has a 204lic (ey that

4 can be used to identi(y the assembly. A Strong Name has t&o other properties/ Version and Name. Publisher . This evidence indicates that an assembly has been $igitally signe$ 'ith a certificate such as ".;<=. hen a signed assembly is loaded/ the CLR recogni,es the certi(icate and adds a %ublisher ob.ect to the assembly. Hash . !y applying a computational algorithm to an assembly/ a uni1ue identi(ier )no&n as a hash is created. Application Directory . This evidence is used to grant a permission set to all assemblies that are located in a speci(ied directory or in a subdirectory o( the running application. Site . Site evidence is the top2 level portion o( a >RL that e'cludes the (ormat and any subdirectory identi(iers. 4or e'ample/ &&&.corecsharp.net is e'tracted as site evidence (rom http-??&&&.corecsharp.net?code. URL . This evidence consists o( the entire >RL identi(ying &here an assembly comes (rom. 0n the preceding e'ample/ http-??&&&.corecsharp.net?code is provided as URL evidence. Zone . The
System.Security.SecurityZone

net&or). 2 Internet . Code coming (rom the 0nternet that is identi(ied by an :TT% or 0% address. 0( the local machine is identi(ied as http:// oca host/ / it is part o( the Internet ,one. 2 Ruste! . 0denti(ies 0nternet sites that are trusted. These sites are speci(ied using #icroso(t 0nternet E'plorer *0E+. 2 Un Ruste! . Sites speci(ied in 0E as being malicious or untrust&orthy. 11) What are $ecurity (olicies? )o# .!E" applies security policies? Sec0rity 6olicies A .NET security policy de(ines ho& assembly evidence is evaluated to determine the permissions that are granted to the assembly. .NET recogni,es (our policy levels- !nterprise / Machine / User / and "pp ication #omain . The policy2level names describe their recommended usage. !nterprise is intended to de(ine security policy across all machines in the enterprise9 Machine de(ines security (or a single machine9 User de(ines security policy (or individual users9 and "pp ication #omain security is applied to code running in a speci(ic AppDomain. !nterprise / Machine / and User policies are con(igured by an administrator. 12) )o# .!E" applies security policies?
9o' %N:T -22lies Sec0rity 6olicies

enumeration de(ines (ive security ,ones- MyComputer / Intranet / Internet / trusted / and Untrusted . An assembly@s zone evidence is the ,one (rom &hich it comes. 2 MyComputer . Code coming (rom the local machine. 2 Intranet . Code coming (rom computers on the same local area

Each sec0rity 2olicy le5el is made up o( one or more co$e sets. Each code set/ in turn / contains a set o( permissions that are mapped to a speci(ic evidence type. 4igure

5 5;2A illustrates ho& code sets and policy levels are combined to yield a permission set (or an assembly.
&ig0re !=-?% - 2ermission set is create$ from the intersection of 2olicy le5el 2ermissions

net&or) or the 0nternet to clients using any language or operating system. As sho&n in 4igure 5A25/ eb Service communications are implemented using e'isting technology and standards that re1uire no proprietary vendor support. 11) $efine the terms a) %&'(') b) *%%') &) +,-) d) "./'. TC6AI6 "Transmission Control 6rotocolAInternet 6rotocol+. A communications protocol suite that (orms the basis o( the 0nternet. 0t@s an open system that governs the (lo& o( data bet&een computers by brea)ing data into chun)s that are easily routed over a net&or). A eb Service user or developer rarely has direct contact &ith this layer. 9TT6 "9y2erte8t Transfer 6rotocol). Technically/ this te't2 based protocol is a Remote %rocedure Call *R%C+ protocol that supports re1uest?response communications. The .NET 4rame&or) as &ell as most production eb Services use it because it has &ide support and generally allo&s in(ormation to sail unimpeded through (ire&alls. !oth the :TT% $%S& and :TT% '!& methods are supported in .NET as a &ay to call a eb Service. B,> ":8ten$e$ ,ar(02 >ang0age)% eb Services communication lends data to be seriali,ed into "#L (ormat (or storage or transmission. The (act that it is te't based ma)es it easy to &or) &ith. Bust about every programming environment supports tools (or encoding and decoding "#L (ormatted data. 0ts inherent (le'ibility/ e'tensibility/ and validity chec)ing ma)e it attractive to eb Services that must deal &ith simple

12) Explain briefly *+& Web $evices. *+& Web $ervices provide a relatively simple technique for accessing a method on an object that is runnin on a local or remote computer. !eb "ervices are based on standardi#ed technolo ies such as )""( and *+& that are desi ned to promote seamless interoperability amon different operatin systems. 13) Define )""( and $,A(. 9TT6 an$ S+-63a 2rotocol that codi(ies ho& "#L is used to pac)age the re@0est an$ res2onse $ata that comprise a *e4 Ser5ice o2eration3are the t&o cornerstones o( eb Services. $ther protocols such as GET and %$ST are available/ but the Simple $b.ect Access %rotocol *S$A%+ has (e&er limitations and is used in the ma.ority o( real2&orld applications. 1-) Explain the Architecture of Web $ervices and its constituent parts. The *e4 Ser5ice architect0re is a service2 oriented architecture that enables applications to be distributed across a

0 data types such as strings/ as &ell as more comple' data structures. There are currently t&o "#L2based protocols used (or delivering eb Services- "#L2R%C and S$A%. !ecause .NET supports S$A%/ this chapter (ocuses on it. S+-6 "Sim2le +47ect -ccess 6rotocol). S$A% is de(ined as Ca light'eight 2rotocol (or e'change o( in(ormation in a decentrali,ed/ distributed environment.C D5E 0t is not designed speci(ically (or eb Services/ nor restricted to :TT%9 but its R%C speci(ications de(ine a model (or invo)ing methods on a speci(ied target machine/ passing parameters/ handling (aults/ and receiving a method response. .0t is to be noted that "#L and S$A% are typically handled transparently by .NET.
&ig0re !?-!% *e4 Ser5ice trans2ort

*S3> provides the name of the ser5ice/ the signat0re of the metho$"s) that can be called/ the a$$ress of the ser5ice *usually a U.>+/ and 4in$ing information that describes ho& the transport operation &ill occur. 0n practical terms/ the SDL in(ormation contains the methods that actually call a eb Service. 1.) What is /DD0? *e4 sites are identi(ied by a $omain name and 0% address that are maintained by a distributed net&or) service )no&n as the Domain Name System "3NS)% Ser5ers in this net&or) are responsible (or controlling e2mail delivery and translating $omain names into I6 a$$resses% The combination o( DNS and eb search engines enables users to 1uic)ly locate eb content. :o&ever/ neither DNS servers nor search engines provide a (ormal &ay o( identi(ying *e4 Ser5ices. To organiCe *e4 Ser5ices into a publicly searchable directory/ a 204lic consorti0m *&&&.uddi.com+ comprising hundreds o( companies has de(ined a standard )no&n as Uni5ersal 3escri2tion 3isco5ery an$ Integration "U33I)% This standard de(ines a S+-6-4ase$ interface that can be used to 204lish a ser5ice or in@0ire a4o0t ser5ices in a U33I-com2liant registry. The registry has a business2to2business (lavor about it3 containing in(ormation about a company/ its services/ and inter(ace speci(ications (or any eb Services it o((ers. 0mportantly/ there is no single >DD0 registry. 0!#/ SA%/ and #icroso(t maintain the most prominent registries.
&ig0re !?-2% 3isco5ering an$ accessing a *e4 Ser5ice

15) )o# #eb service is discovered and used by the consumer? 3isco5ering an$ Using a *e4 Ser5ice To use a *e4 Ser5ice/ a client must have a description o( ho' to access the ser5ice. This in(ormation is provided by a eb Services Description Language "*S3>) document .

1
*(ind5ua i(iers/, *name,stoc6 )uote*/name, */(ind.tMode , */-ody,

The dialog bet&een the client and >DD0 registry server is conducted using S$A% messages. $verall/ >DD0 de(ines appro'imately 6< S$A% messages (or in1uiry and publishing. 10) &ist the steps in /DD0 Discovery example.
U33I 3isco5ery :8am2le

*/!n+e ope,

Ste2 2D .egistry Ser5ice .es2on$s 'ith >ist of Ser5ices ,atching .e@0est

A list o( tMode )eys is returned. These )eys are used (or the subse1uent 1uery-

To demonstrate ho& to use >DD0/ &@e@ll loo) at the S$A% messages sent bet&een client and server as &e see) to discover a eb Service that can provide a stoc) 1uote. A eb2based >DD0 bro&ser sends and receives the messages.
Ste2 !D Sen$ 3isco5ery .e@0est

Ste2 ED .etrie5e +5er5ie' 3oc0ment Containing *S3>

4or our e'ample/ &e@ll search the >DD0 registry provided by #icroso(thttp://uddi.microso(t.com/in)uire

The res2onse message includes the "#er#ie$URL element that points to a *S3> $oc0ment. This document contains the in(ormation needed to create an application to access the service. 1 ) Explain the steps re1uired for building the #eb services by hand. 2ive a suitable example #ith code and diagrams.

An in1uiry may re1uest 40siness information or tMo!el in(ormation. The (ormer contains in(ormation about a business/ including a description o( services. The (ollo&ing message re1uests a list o( tMode )eys (or companies &hose service includes providing a stoc( @0ote.
*!n+e ope, *-ody, *(ind.tMode ma3Ro4s/01220, generic/01.20

<0il$ing an B,> *e4 Ser5ice


Creating a *e4 Ser5ice 4y 9an$ Ste2-I -The (irst step is to select or create a 5irt0al $irectory under 00S that &ill hold the eb Service source code (ile*s+. Then/ assign it an alias that &ill be used in its >RL. 0n our e'ample/ &e &ill place the service in the 74s subdirectory. Ste2-II -A(ter the directory has been set up/ the ne't step is to use a te't editor to create

8 a file in this directory 'ith the %asm& e8tension to contain the eb Service code. An e'ample &ebService &hich e'poses a method 'etday-orn that accepts three integer parameters that represent the month/ day/ and year (or birth date. A string value containing the day o( the &ee) *#onday/ Tuesday/ and so on+ (or this date is returned. 13) Explain salient features of example #eb service code. The code consists o( a single class and a method that is invo)ed by a client to return the day2o(2&ee) value.
*e4Ser5ice 3irecti5e

Testing the *e4 Ser5ice

A 1uic) &ay to test the ne&ly developed eb Service is to point a bro&ser to its location. 4or this e'ample/ &e enter the addresshttp:// oca host/4s/-irth#ay8S.asm3

!9) :82lain the ste2s in 40il$ing an B,> *e4 Ser5ice client%

<0il$ing an B,> *e4 Ser5ice Client


This section describes ho& to create a client application that consumes a eb Service. The ob.ective is to ma)e the client@s call to the remote eb method as simple as calling a method in its o&n code. !e(ore delving into details/ let@s (irst ta)e a high2level vie& o( ho& a .NET eb Services client interacts &ith a eb Service. The most important thing to observe in 4igure 5A27 is that the client does not directly invo)e the eb Service method. 0nstead/ it calls a pro'y ob.ect that per(orms this tas). The pro'y class is created (rom the SDL in(ormation provided by the eb Service. The messages e'changed bet&een the pro'y and server are bundled &ithin an :TT% re1uest and transmitted using either the :TT% or the S$A% &ire protocol .
&ig0re !?-F% +5er5ie' of ho' a client accesses a *e4 Ser5ice

The 8e9Ser+ice directive identi(ies the (ile as de(ining a eb Service*:; 8e9Ser+ice Language/0C<0 C ass/0-irth#ay8S.-irth#ay0 :,

The directive speci(ies the class implementing the "#L eb Service and the programming language used in the implementation. 0n this e'ample/ the directive and the code (or the class are present in the -irth#ay8S.asm3 (ile. This statement &ould be the only line needed in the .asm3 (ile.
*e4,etho$ -ttri40te

The 8e9Method attribute identi(ies a method as being accessible to clients ma)ing :TT% re1uests 3that is/ as an "#L eb Service.
=System.8e9.Ser+ices.8e9Method >#escription/0Return day o( 4ee6 (or a date0?@

*de(initions 3m ns:http/0http://schemas.3m soap. org/4sd /http/0 AAAAAAAAA. ,

F<+ :82lain 4riefly *S3>.structure *e4 Ser5ices 3escri2tion >ang0age "*S3>) SDL is broadly de(ined as Can "#L (ormat (or describing net&or) services as a set of en$2oints operating on messages containing either document2oriented or procedure2oriented in(ormation.C DFE 0n our case/ the endpoints are the client and a eb Service/ and SDL de(ines ho& the client interacts &ith the service.
The *S3> Str0ct0re

Namespaces are used to distinguish elements because it is possible that elements (rom di((erent namespaces could have the same name .
GTy2esH

This element contains an "SD *"#L Schema De(inition Language+ schema that describes the data types publicly e'posed by the service- the parameters passed in the eb Service re1uest/ and the response*types, *s:schema e ementBorm#e(au t/0)ua i(ied0 AAAAAAAA. */types,

Speci(ications (or the SDL grammar de(ine si8 ma7or elements definitions, types, message, port type, binding, and service.

G,essageH

De(ines the data that is e'changed bet&een the eb Service provider and consumer.
*message name/0'et#ay-ornSoapIn0,

Let@s discuss these &ithin the conte't o( the SDL (ile that describes the sample -irth#ay8S eb Service.
G3efinitionsH

*part name/0parameters0 e ement/0s2:'et#ay-orn0 /, */message, G6ortTy2eH

This is the root element o( the SDL document. 0t declares multiple namespaces used throughout the document/ and contains all o( the other elements-

The *port&ype, element contains *operation, elements that correspond to the methods in the eb Service. The *input, and *output, elements de(ine the

12 messages associated &ith the operation.


*port&ype name/0-irth#aySoap0, *operation name/0'et#ay-orn0, AAA.. */operation, */port&ype,

Sim2le +47ect -ccess 6rotocol "S+-6) S+-6 is a 2latform-ne0tral 2rotocol (or e'changing in(ormation. 0ts cross2plat(orm capabilities are attributable to its use o( B,> to de(ine the data being passed and support (or 9TT6 as a communications protocol. S$A% is the most popular and (le'ible protocol (or the e'change o( in(ormation bet&een eb Service consumers and providers. 0ts (ormat allo&s it to de(ine comple' data structures not supported by the competing :TT% '!& and $%S& protocols.
- S+-6 .e@0est ,essage

G<in$ingH

- set of r0les that describe ho& the *port&ype, operation is transmitted over the &ire. ire protocols available are :TT% '!& / :TT% $%S& / and S$A%. This e'ample demonstrates ho& S$A% is speci(ied.
*9inding name/0-irth#aySoap0 type/0s2:-irth#aySoap0, .. GSer5iceH

The header (or a S$A% re1uest reveals that the S$A% re1uest is pac)aged as an :TT% $%S& re1uest to the server designated by the Cost (ield. The ength (ield speci(ies the number o( characters in the body o( the $%S& / and S%"$"ction indicates the namespace and method to be contacted.
$%S& /4s/-irth#ay8S.asm3 C&&$/1.1 Cost: oca host

0denti(ies the location of the *e4 Ser5ice. Speci(ically/ it lists the name o( the eb Service class/ the >RL/ and re(erences the binding (or this endpoint.
*ser+ice name/0-irth#ay0, *port name/0-irth#aySoap0 9inding/0s2:-irth#aySoap0, *soap:address ocation/

ContentD&ype: te3t/3m E charset/ut(DF ContentDLength: ength

S%"$"ction: 0http://tempuri.org/'et#ay-orn0

0http:// oca host/4s/-irth#ay8s.asm 30 /, */port, */ser+ice,

Listing 5A2G sho&s the B,> tem2late (or the S+-6 message that is sent to the server.
>isting !?-E% 'et!ay(orn S+-6 .e@0est Content

2!) :82lain in $etail S+-6%

)*&ml #ersion+,-%., encoding/0ut(D F0G,

11
)soap/0n#elope 3m ns:3si/0http://444.4H.org/I221/J MLSchemaDinstance0 DDDDDDDDDD *soap:-ody soap:encodingSty e/ 0http://schemas.3m soap.org/soap/en coding/0, *tns:'et#ay-orn, DDDDDDDDDDD */soap:-ody, */soap:!n+e ope,

*tns:'et#ay-ornResponse, *'et#ay-ornResu t 3si:type/03sd:string0,string*/'et#a y-ornResu t, */tns:'et#ay-ornResponse, */soap:-ody, */soap:!n+e ope,

FF+ *hat are the iss0es of 40il$ing 'e4 ser5ices 'ith com2le8 $ata ty2es%

Using *e4 Ser5ices 'ith Com2le8 3ata Ty2es


The -irth#ay8S eb Service used throughout this chapter accepts integers as input and returns a string value. This is use(ul (or introducing eb Service principles because :TT% '!& / :TT% $%S& / and S$A% all support it. :o&ever/ eb Services also have the capability o( serving up more comple' data types such as data sets/ hash tables/ images/ and custom ob.ects. !e(ore data can be sent to or (rom a eb Service/ it is seriali,ed using "#L seriali,ation. Conversely/ it is deseriali,ed on the receiving end so it can be restored to its original type. Not all data can be seriali,ed. Thus/ &hen designing a eb Service/ it is important to understand restrictions that apply to seriali,ationFG+ *hat are the factors affecting 2erformance of a 'e4 ser5ice;

The overall structure o( a S$A% message is not comple'. 0t is an "#L document that has a mandatory root element/ *!n+e ope, / an optional *Ceader, element/ and a mandatory *-ody, . - S+-6 en5elo2e/ as the name implies/ is conceptually a container for the message. The S$A% header represents a &ay to e'tend the basic message. The S+-6 4o$y contains &hat one &ould regard as the act0al $ataD the arguments sent to the service and the response. The contents o( the *-ody, element in this e'ample consist o( the method name and its three parameters that correspond to the call made &ithin the client codestring day%(8ee6 / 9d.'et#ay-orn>1IKI2K1LMH?E

- S+-6 .es2onse ,essage

The S$A% body o( the response includes a *'et#ay-ornResu t, element

*e4 Ser5ices 6erformance


The per(ormance o( a eb Service (rom both the client and server side is a((ected by

12 a variety o( (actors. Some are .NET related and others are inherent in the technology.
The Nagle -lgorithm

$ne &ay to improve net&or) e((iciency is to reduce the number o( small data pac)ets sent across a net&or). To accomplish this/ the so(t&are layer controlling the underlying TC% *Transmission Control %rotocol+ connection attempts to accumulate/ or bu((er/ small messages into a larger TC% segment be(ore they are sent. The techni1ue to do this is based on the Nagle algorithm .
D6E

Loo) at compression techni1ues such as :TT% transport compression or the S$A% e'tensions that can compress part o( a eb Service message.

The cru' o( the algorithm is that small amounts o( data should continue to be collected by TC% until it receives ac)no&ledgment to send the data. .NET institutes a delay o( up to F<< milliseconds to collect additional data (or a pac)et. 4or a typically small eb Service re1uest/ there may be no reason to include this delay. 0t@s an option you can e'periment &ith. *or(ing 'ith >arge -mo0nts of 3ata Although the "#L (ormat o((ers a great deal o( (le'ibility in representing data/ it can place a potentially large burden on a net&or) because o( the large (iles that can be generated. #oreover/ processing "#L data can re1uire e'tensive memory resources on the client and server. 4or large amounts o( data/ consider these options

>se 4T% or a eb client as described in Section 5H.7/ CCreating a eb Client &ith ebRe1uest and ebResponse.C Avoid calls as much as possible by caching data rather re2re1uesting it.

Das könnte Ihnen auch gefallen