SOAP Message in WCF:
1. The max size of SOAP message in WCF is 9,223,372,036,854,775,807 bytes. Including metadata.
2. For actual user data we can use 2,147,483,647 bytes out of it.
3. With default setting WCF uses only 65536 bytes.
4. We can change it by setting maxReceivedMessageSize in clients app.config file.
5. So selection of data types in Data Contract and Data table will matter a lot!
“Amazing blog for WCF!”
Data Contract:
1. By Default WCF can serialize 65536 DataMember.
2. We can change it to max 2147483646.
3. How? Please go to: http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/4a81a226-175b-41d3-864a-181792c71ffe
Tracing WCF service message:
1. Enable message log of WCF: http://www.avingtonsolutions.com/blog/post/2008/07/25/Tracing-SOAP-Messages-in-WCF.aspx
2. Run SvcTraceViewer.exe utility from Visual Studio Command prompt.
3. Open log file in SvcTraceViewer.
Scalability of WCF:
- Max Concurrent Calls (default = 16; Max = 2147483647 ) [Per-message]:
The maximum number of messages that can actively be processed. Increase this value if you want your service to be able to process a larger message load.
- Max Concurrent Instances (default = Int32.Max; Max = 2147483647)
The maximum number of InstanceContext objects in a service that can execute at one time. What this setting translates into depends on the InstanceContextMode that is set on the ServiceBehaviorAttribute on the service.
a. If this is set to "PerSession", then this would represent the maximum number of sessions.
b. If this is set to "PerCall", then this is the maximum number of concurrent calls.
c. If this is set to "Single", then this value doesn’t really mean anything anymore.
- When a message comes into the service and the maximum number of InstanceContext objects already exists, then the message goes into a wait pattern until an existing InstanceContext is closed.
- Max Concurrent Sessions (default = 10; Max = 2147483647) [Per-channel]
The maximum number of sessions that a service can accept at one time. This setting only affects "session" enabled channels. Once this threshold is reached, no channels will not be accepted to the service.
Advantages of WCF:
A) On windows platform if we camper the other technology with WCF :
1. WCF is 25% - 50% faster than ASP.NET Web Services.
2. 25% Faster than .NET remoting.
3. WCF will provide the most significant performance gains of almost 4x.
4. Here is A Performance Comparison of WCF with Existing Distributed Communication Technologies
B) WCF provides internal Reliable Messaging support.
C) For Authentication, Authorization, and user Identities WCF provide multiple options. Also provide high level of Security.
D) WCF provides multiple hosting options:
· Windows Forms applications
· Console applications
· Windows services
· Web applications (ASP.NET) hosted on Internet Information Services (IIS)
· WCF services inside IIS 7.0 and WAS on Windows Vista or Windows Server 2007
E) Managing Data Base Operation in WCF will provide central access for all clients.
Comments
Post a Comment