Elton Stoneman

  Home  |   Contact  |   Syndication    |   Login
  120 Posts | 0 Stories | 3600 Comments | 0 Trackbacks

News

Archives

Post Categories

[Source: http://geekswithblogs.net/EltonStoneman]

WCF bindings provide the MaxReceivedMessageSize property, which lets you block any incoming messages on the client side over a given size (defaulting to 64Kb). If you're using message-based itinerary processing with ESB Guidance, when a WCF service returns a message larger than this default, you'll get a System.ServiceModel.QuotaExceededException and the response message will be suspended:

System.ServiceModel.CommunicationException: The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element. ---> System.ServiceModel.QuotaExceededException: The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.

Setting the MaxReceivedMessageSize property is straightforward in a configured WCF port, but in ESB Guidance the port is configured dynamically and there's no straightforward way to interrupt it and add your own WCF bindings. To give us access to the message and the port, we replaced the "DynamicSendResponse" port used in the GlobalBank.ESB sample with a simple orchestration.

The orchestration has a direct-bound receive port filtering on the usual properties:

(Microsoft.Practices.ESB.Itinerary.Schemas.ServiceName == "DynamicResolutionSolicitResp") &&

(Microsoft.Practices.ESB.Itinerary.Schemas.ServiceState == "Pending") &&

(Microsoft.Practices.ESB.Itinerary.Schemas.ServiceType == "Messaging")

 

- it then builds the outgoing message for the service, and configures the dynamic send/receive port. At this point the message has all the properties you need configured by ESB (via the resolver pipeline component in the previous itinerary steps), so you can extract them to configure the port, and add any WCF binding configuration you need.

We store the configuration in the Enterprise Single Sign-On application config store using SSO Config Tool, so the expression to build the outgoing message and increase the received message size looks like this –

//setup port from context properties:

sptServiceProvider(Microsoft.XLANGs.BaseTypes.Address) = ServiceProviderRequest(BTS.OutboundTransportLocation);

sptServiceProvider(Microsoft.XLANGs.BaseTypes.TransportType) = ServiceProviderRequest(BTS.OutboundTransportType);

 

//set message size from config:

maxReceivedMessageSize = x.y.z.Configuration.X_Y_Z_Config.WCFMaxReceivedMessageSize;

ServiceProviderRequest(WCF.MaxReceivedMessageSize) = maxReceivedMessageSize;

Microsoft.Practices.ESB.Adapter.AdapterMgr.SetMsgProperty(ServiceProviderRequest, typeof(WCF.MaxReceivedMessageSize), maxReceivedMessageSize);

 

//set timeout from config:

sendTimeout = x.y.z.Configuration.X_Y_Z_Config.WCFSendTimeout;

ServiceProviderRequest(WCF.SendTimeout) = sendTimeout;

 

Note that the WCF config is set on the message, not on the port. We're also setting timeout values here. When you're dealing with large messages, you may get operation timeouts as the default binding config from BizTalk is set to a pessimistic 1 minute. Value WCF.SendTimeout specifies how long the BizTalk client waits for a response, and WCF.ReceiveTimeout how long the BizTalk client allows for the reception of a request. If your WCF service is hosted in IIS and is long-running, you may also have an issue with IIS controlling execution times. See: Why changing SendTimeout does not help for hosted WCF services.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
posted on Wednesday, February 25, 2009 5:51 PM

Feedback

# re: Receiving large WCF response messages in ESB Guidance 5/13/2009 5:44 AM maruti
just created a video and uploaded for the easy kindly download the same and you will get the idea regarding the buffer size, or maximassagesize issue, or maxarraylength etc.

http://dc153.4shared.com/download/104448179/ab2b182d/wcfandlargedata.mp4

for further videos --

http://www.elearningfromhome.com/Sample_Videos.html


# re: Receiving large WCF response messages in ESB Guidance 3/4/2010 3:23 AM jmail
Nice Post,thanks for share!Restore Deleted Files|进程保护

# re: Receiving large WCF response messages in ESB Guidance 3/4/2010 3:24 AM ddark
Nice Post,thanks for share!Data Recovery Software|Guard Process

# re: Receiving large WCF response messages in ESB Guidance 3/4/2010 6:28 AM Sram Red
Hey, you have a great blog here! I'm definitely going to bookmark you!Each & every tips of your post are awesome.Thanks a lot.Keep sharing your views.

# re: Receiving large WCF response messages in ESB Guidance 4/24/2010 8:00 AM storesonline
Amazing themes, will these work for my game website? , looking for good design. Thanks for sharing this post with us.

# re: Receiving large WCF response messages in ESB Guidance 2/18/2011 12:37 PM Lipo
A binding defines how an endpoint communicates to the world. It can contain binding elements that specify details like the security mechanisms used to secure messages, or the message pattern used by an endpoint.

# re: Receiving large WCF response messages in ESB Guidance 3/12/2011 6:25 PM Sacramento Carpet Repair
This article gives the light in which we can observe the reality. This is very nice one and gives in depth information. Thanks for this nice article. Good post.....Valuable information for all.

# re: Receiving large WCF response messages in ESB Guidance 3/13/2011 11:33 AM electric tankless water heaters
We are looking for crucial information on this subject. The information was important as we are about to launch our own portal. Many thanks for providing a missing link in my business..its a pleasure and a great experience..

# re: Receiving large WCF response messages in ESB Guidance 3/21/2011 12:27 PM Phentramin-D
Your blog is very knowledgeable information, It could be very helpful in IT as well as e-business industry. Keep the great work. Thanks!

# re: Receiving large WCF response messages in ESB Guidance 3/22/2011 5:26 PM accredited online degrees
After I read your article, I was quite interested in what you write because it is very useful for me. I really am learning about this and your article was very helpful to me.

# re: Receiving large WCF response messages in ESB Guidance 3/27/2011 5:28 AM Fort Worth Carpet Repair
Nice information, many thanks to the author. It is incomprehensible to me now, but in general, the usefulness and significance is overwhelming. Thanks again and good luck!!

# re:Receiving large WCF response messages in ESB Guidance 5/15/2011 7:37 PM George Goodman
Wow thanks for this. I appreciate the amount of time it must have taken to write this.

# re: Receiving large WCF response messages in ESB Guidance 6/5/2011 12:14 AM Escorts in London
The power of the internet can not be put into words, the world is surely becoming a much smaller place... this is a good topic of discussion and hope your success rubs off...
Indian escorts London

# re: Receiving large WCF response messages in ESB Guidance 6/14/2011 11:21 AM Ian
A binding defines how to communicate with one end of the world. May contain binding elements that specify details like the security mechanisms used to protect messages or the message pattern used by an endpoint.
Just Dreams Reviews

# re: Receiving large WCF response messages in ESB Guidance 6/17/2011 3:54 AM driving lessons Birmingham
Very good tips...It's provided a couple but it would be nice if you went into a little more detail about it..


# re: Receiving large WCF response messages in ESB Guidance 6/18/2011 9:40 AM freetress
hmmm thanks for sharing such a nice information
please keep it up dude

# re: Receiving large WCF response messages in ESB Guidance 6/27/2011 4:38 AM forex
I admire the valuable information you offer in your articles.I am very impressed with the article I have just read.Thanks a lot.


# re: Receiving large WCF response messages in ESB Guidance 8/5/2011 6:52 PM Konstali Helsenor
Enkelt alternativ for å få nyttig informasjon og å dele ideer. Jeg var veldig glade over å finne dette nettstedet. Jeg ønsket å takke deg for denne store lese! Jeg definitivt nøt hver lille bit av det, og jeg har dere bokmerkelinkene å sjekke ut nye ting du poster.

# re: Receiving large WCF response messages in ESB Guidance 9/22/2011 7:15 AM copy wii games
Your article is very topical for me..I’ll be checking in on a regularly now….Keep up the good work!

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: