<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">akshar</title><subtitle type="html" /><id>http://blogs.msdn.com/b/akshar/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/akshar/" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/b/akshar/atom.aspx" /><generator uri="http://telligent.com" version="5.6.50428.7875">Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><updated>2010-09-10T10:49:00Z</updated><entry><title>AppFabric Azure Caching : The remote name could not be resolved *.windows.net</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/akshar/archive/2011/11/14/appfabric-azure-caching-the-remote-name-could-not-be-resolved-windows-net.aspx" /><id>http://blogs.msdn.com/b/akshar/archive/2011/11/14/appfabric-azure-caching-the-remote-name-could-not-be-resolved-windows-net.aspx</id><published>2011-11-14T07:21:53Z</published><updated>2011-11-14T07:21:53Z</updated><content type="html">&lt;p&gt;A lot of internal customers seem to face this issue since *.windows.net is not directly resolvable within corpnet. In this case you need to install &lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;Forefront TMG Client .&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;Another interesting case is when you deploy your web application which uses caching under an app-pool whose identity is a system account (like NetworkService, I think this is the default too),&amp;nbsp; cache&amp;nbsp;request/resolution might again fail. Looks like Forefront TMG client doesn't&amp;nbsp;cater to&amp;nbsp;non-domain accounts. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;But there is a simple workaround : run &lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&amp;lsquo;FwcTool /g /app:w3wp&amp;rsquo;&lt;br /&gt;from TMG client installation folder. I believe this gives w3wp.exe&amp;nbsp;access to network&amp;nbsp;resources via TMG client regardless of account which runs the w3wp&amp;nbsp;process.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10236725" width="1" height="1"&gt;</content><author><name>Akshat Sharma</name><uri>http://blogs.msdn.com/Akshat-Sharma/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>AppFabric Azure Caching : Quota throttling errors</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/akshar/archive/2011/06/03/appfabric-azure-caching-connection-quota-throttling-errors.aspx" /><id>http://blogs.msdn.com/b/akshar/archive/2011/06/03/appfabric-azure-caching-connection-quota-throttling-errors.aspx</id><published>2011-06-03T10:39:00Z</published><updated>2011-06-03T10:39:00Z</updated><content type="html">&lt;p&gt;(This article is focused and valid only for Azure AppFabric Caches and not for Windows Server AppFabric Caches.)&lt;/p&gt;
&lt;p&gt;Azure AppFabric Caches come with quota limits. Quota limits are mentioned &lt;a href="http://msdn.microsoft.com/en-us/library/gg602420.aspx#C_BKMK_FAQ2"&gt;here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here are some of the reasons why you might be throttling on:&lt;br /&gt;&lt;br /&gt;1. &lt;span style="font-size: small;"&gt;&lt;strong&gt;Bandwidth or Transactions&lt;/strong&gt;&lt;/span&gt;: This means that you are actually in need of a bigger cache since your cache usage is pretty huge. (or need to re-architecture the app so that it uses less bandwidth &amp;amp; does fewer transactions)&lt;/p&gt;
&lt;p&gt;2. &lt;strong&gt;&lt;span style="font-size: small;"&gt;Connections &lt;/span&gt;&lt;/strong&gt;: This might point to a bug in your code, an erroneous setting in DataCacheConfiguration or may be just because you weren't aware of the connection quotas till now. Lets take the example of 128 MB cache. The allowed connection count is 5. For you to exceed this count, following are the possibilities:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;a. &lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;DataCacheFactoryConfiguration.MaxConnectionToServer is set to value of more than 5 :&lt;/strong&gt;&lt;/span&gt; In this case, whenever you instantiate a &lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;new&lt;/strong&gt;&lt;/span&gt; DataCacheFactory and get a DataCache from it, you are essentially opening more than 5 connections to Azure AppFabric Cache service which would mean that you are exceeding the allowed count. Please note that it is okay to do multiple GetDefaultCache() on a single DataCacheFactory since only one instance of DataCache is created per instance of factory and GetDefaultCache() returns back the same instance each time.&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;strong&gt;Solution&lt;/strong&gt;: Try setting the value to 1 and try again.&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;b. &lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;Several instances of DataCaches created from different DataCacheFactories&lt;/strong&gt;&lt;/span&gt;: If in your code you are initializing several DataCacheFactories and do a GetDefaultCache() from each one of them, then each instance of DataCache you get from each factory is going to have it's own connections to the Azure cache service.&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;strong&gt;Solution&lt;/strong&gt;: Create only a single instance DataCacheFactory (per cache endpoint) in your code and re-use it as much as possible. If you really need to have several instances of DataCacheFactories, please ensure to Dispose() them off, once they are not needed.&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;c. &lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;Several instances of application running with Windows Azure&lt;/strong&gt;&lt;/span&gt;: It might also be a case that your application has several instances deployed and each one of them is using the same cache. In such a case you are exhausting the connections since each instance is creating connections to Azure cache service.&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;strong&gt;Solution&lt;/strong&gt;: Upgrade your cache subscription.&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;d. &lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;Mu&lt;/span&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;ltiple&lt;/strong&gt; applications / test applications&amp;nbsp;sharing the same cache:&lt;/span&gt;&lt;/strong&gt; Since the connection count is a server side property, if various applications use the same azure cache, each one of those applications are actually contributing to the connections count to that particular cache.&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;strong&gt;Solution&lt;/strong&gt;: Use different caches for different apps unless apps are sharing the data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10171053" width="1" height="1"&gt;</content><author><name>Akshat Sharma</name><uri>http://blogs.msdn.com/Akshat-Sharma/ProfileUrlRedirect.ashx</uri></author><category term="azure appfabric cache throttling quota connections" scheme="http://blogs.msdn.com/b/akshar/archive/tags/azure+appfabric+cache+throttling+quota+connections/" /></entry><entry><title>Azure AppFabric Caching - ErrorCode&lt;ERRCA0017&gt;:SubStatus&lt;ES0006&gt; : What to do?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/akshar/archive/2011/05/01/azure-appfabric-caching-errorcode-lt-errca0017-gt-substatus-lt-es0006-gt-what-to-do.aspx" /><id>http://blogs.msdn.com/b/akshar/archive/2011/05/01/azure-appfabric-caching-errorcode-lt-errca0017-gt-substatus-lt-es0006-gt-what-to-do.aspx</id><published>2011-05-01T11:46:00Z</published><updated>2011-05-01T11:46:00Z</updated><content type="html">&lt;p&gt;ErrorCode&amp;lt;ERRCA0017&amp;gt;:SubStatus&amp;lt;ES0006&amp;gt;:There is a temporary failure. Please retry later. (One or more specified cache servers are unavailable, which could be caused by busy network or servers. For on-premises cache clusters, also verify the following conditions. Ensure that security permission has been granted for this client account, and check that the AppFabric Caching Service is allowed through the firewall on all cache hosts. Also the MaxBufferSize on the server must be greater than or equal to the serialized object size sent from the client.)&lt;/p&gt;
&lt;p&gt;You might encounter this error at some point during developing/deploying/testing your application which uses AppFabric Caching. Sadly, this is very generic and doesn't tell you a lot about what went wrong and who the culprit is. Fortunately, :-) we have a way to figure out the inner exception which might give us a some clue as to what happened. Before intializing the DataCacheFactory modify the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.applicationserver.caching.datacachefactoryconfiguration.channelopentimeout(v=ws.10).aspx"&gt;DataCacheFactoryConfiguration.ChannelOpenTimeout&lt;/a&gt; of the dataCacheFactoryConfiguration instance that you are using to a larger value of 2 minutes. (can't use configuration to set the value, since 20 seconds in the allowed limit) .&amp;nbsp;Also, this recommendation is only for debugging purposes and ideally should not be needed in production environments.&lt;/p&gt;
&lt;p&gt;This lets the underlying layer to&amp;nbsp;respond back with the actual error that occurred. Now, if you check the inner exception, you should see what caused the request to fail.&lt;/p&gt;
&lt;p&gt;This is also valid for Connection Terminated error: Microsoft.ApplicationServer.Caching.DataCacheException: ErrorCode&amp;lt;ERRCA0028&amp;gt;:SubStatus&amp;lt;ES0001&amp;gt;:The connection was terminated possibly due to server or network problems. Result of the request is unknown.&lt;/p&gt;
&lt;p&gt;If the inner exception&amp;nbsp;when you do&amp;nbsp;a Get() or a Put() (not valid for GetDefaultCache()) says "&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host&lt;/strong&gt;&lt;/span&gt;" this would actually mean that your connections are idling out. Basically in azure, if a connection remains idle for more than a minute, it is dropped. Sometimes, the notification for dropped connection is not received by the channel layer and next time when a cache request comes in, it will fail since the connection is stale. We could avoid this if DataCacheFactoryConfiguration.TransportProperties.ReceiveTimeout is set to a value less than&amp;nbsp;1 minute (say 45 seconds). This will proactively refresh the connection before it gets closed by Azure. This recommendation&amp;nbsp;can be used in production environment in case the cache usage is intermittent/sporadic.(with pauses of more than 1 minute or so.)&lt;/p&gt;
&lt;div class="mcePaste" id="_mcePaste" style="position: absolute; width: 1px; height: 1px; overflow: hidden; top: 0px; left: -10000px;"&gt;﻿&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;PS: &lt;/p&gt;
&lt;p&gt;1. For this to work ensure that the dll version for Microsoft.ApplicationServer.Caching.Core.dll and Microsoft.ApplicationServer.Caching.Client.dll is at least 1.0.4009.0&lt;/p&gt;
&lt;p&gt;2. This is specific to Azure AppFabric Cache only.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10159812" width="1" height="1"&gt;</content><author><name>Akshat Sharma</name><uri>http://blogs.msdn.com/Akshat-Sharma/ProfileUrlRedirect.ashx</uri></author><category term="appfabric caching azure retry later servers unavailable temporary failure ERRCA0017 ES0006 connection terminated" scheme="http://blogs.msdn.com/b/akshar/archive/tags/appfabric+caching+azure+retry+later+servers+unavailable+temporary+failure+ERRCA0017+ES0006+connection+terminated/" /></entry><entry><title>Changing the Windows Azure Web Host  application pool identity</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/akshar/archive/2011/05/01/changing-the-windows-azure-web-host-application-pool-identity.aspx" /><id>http://blogs.msdn.com/b/akshar/archive/2011/05/01/changing-the-windows-azure-web-host-application-pool-identity.aspx</id><published>2011-05-01T11:25:00Z</published><updated>2011-05-01T11:25:00Z</updated><content type="html">&lt;p&gt;Sometimes, need may arise to change the app pool identity of the azure web host you are working with locally on &lt;a href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/Development Fabric/Compute Emulator"&gt;Development Fabric/Compute Emulator&lt;/a&gt;.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;By default, the web host runs under a temporary application pool with NTAUTHORITY\NETWORK SERVICE account. This account may not have access to some key local/remote resources.(e.g. using the proxy server to resolve addresses or send messages). In that case, you can switch the current application pool identity using the snippet below. &lt;/p&gt;
&lt;p&gt;You'll need to add a reference to Microsoft.Web.Administration.dll which is present in %SystemRoot%\system32\inetsrv for following to work. Note that this code should be called at WebRole.OnStart() before&amp;nbsp;base.OnStart() is called.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; using (ServerManager serverManager = new ServerManager())&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string appPoolName = serverManager.Sites[RoleEnvironment.CurrentRoleInstance.Id + "_" + webApplicationProjectName].Applications.First().ApplicationPoolName;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;var appPool = serverManager.ApplicationPools[appPoolName];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; appPool.ProcessModel.UserName = &lt;b&gt;&lt;i&gt;appPoolUserName&lt;/i&gt;&lt;/b&gt;;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;appPool.ProcessModel.IdentityType = ProcessModelIdentityType.SpecificUser;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; appPool.ProcessModel.Password = &lt;b&gt;&lt;i&gt;appPoolPassword&lt;/i&gt;&lt;/b&gt;;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; serverManager.CommitChanges();&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10159811" width="1" height="1"&gt;</content><author><name>Akshat Sharma</name><uri>http://blogs.msdn.com/Akshat-Sharma/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>BizTalk WCF Adapter: Require a "Disable Receive Location after &lt;n&gt; failures" option</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/akshar/archive/2010/11/15/wcfadapter-require-a-quot-disable-receive-location-after-lt-n-gt-failures-quot-option.aspx" /><id>http://blogs.msdn.com/b/akshar/archive/2010/11/15/wcfadapter-require-a-quot-disable-receive-location-after-lt-n-gt-failures-quot-option.aspx</id><published>2010-11-15T11:40:00Z</published><updated>2010-11-15T11:40:00Z</updated><content type="html">&lt;p class="MsoNormal"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;When using&lt;span style="color: #1f497d;"&gt; &lt;/span&gt;WCF-Custom Adapter one can check the box &amp;lsquo;Disable Location on Failure&amp;rsquo; under the &amp;lsquo;Messages tab&amp;rsquo;. While this is a useful functionality there might be cases when we wouldn&amp;rsquo;t want the receive location to get disabled for particular known faults or at least retry some times before disabling it. Say for example, when using WCF-Custom adapter with SqlBinding, a common problem might arise if the SQL server, which we poll, goes down or if there is a network disconnect for some time (&amp;gt; polling interval). We wouldn&amp;rsquo;t want the receive location to get disabled in such cases as such faults might be benign. What leads service host to faulted state, in such cases, is&amp;nbsp; an exception thrown by a channel in the channel stack. &amp;nbsp;An exception in a channel lead the corresponding channel listener communication object,&amp;nbsp;and ultimately the service host, &amp;nbsp;into faulted state.&amp;nbsp;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;In order to allow retrying before the receive location gets disabled, we can use WCF&amp;rsquo;s extensibilty to create a solution which would do the following:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;1. Create a custom binding element (which will be the upper most element in the binding stack) which catches exceptions, maintains an exception counter, retries &amp;nbsp;and throws only after specified number of &amp;nbsp;exceptions have been thrown.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;2. Create a custom endpoint behavior which modifies the binding stack of the endpoint binding by adding our custom binding element mentioned in 1.&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 12pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;By implementing BehaviorExtensionElement with our custom endpoint behavior we should be able to plug it into Biztalk WCF-Custom receive location&amp;rdquo;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;The ExceptionCatcherBehavior can be downloaded from : &lt;/span&gt;&lt;/strong&gt;&lt;a href="http://biztalkserverteam.codeplex.com/releases/view/53456"&gt;&lt;strong&gt;&lt;span style="font-size: small;"&gt;http://biztalkserverteam.codeplex.com/releases/view/53456&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10091059" width="1" height="1"&gt;</content><author><name>Akshat Sharma</name><uri>http://blogs.msdn.com/Akshat-Sharma/ProfileUrlRedirect.ashx</uri></author><category term="biztalk wcf custom adapter receive location failure disable problem behavior" scheme="http://blogs.msdn.com/b/akshar/archive/tags/biztalk+wcf+custom+adapter+receive+location+failure+disable+problem+behavior/" /></entry><entry><title>WCF MessageID missing in void reply</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/akshar/archive/2010/09/10/wcf-messageid-missing-in-void-reply.aspx" /><link rel="enclosure" type="application/octet-stream" length="9295" href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-06-01-75/Microsoft.BizTalk.Adapters.Wcf.EmptyReplyBehavior.zip" /><id>http://blogs.msdn.com/b/akshar/archive/2010/09/10/wcf-messageid-missing-in-void-reply.aspx</id><published>2010-09-10T07:14:03Z</published><updated>2010-09-10T07:14:03Z</updated><content type="html">&lt;p&gt;In WCF, if a contract operation has a void return and is not one way, there is no message ID attached to the reply. I didn't check this up with all bindings but it does happen with basicHttp and wsHttp bindings atleast. (&lt;a title="http://www.w3.org/TR/2006/REC-ws-addr-core-20060509/" href="http://www.w3.org/TR/2006/REC-ws-addr-core-20060509/"&gt;http://www.w3.org/TR/2006/REC-ws-addr-core-20060509/&lt;/a&gt; &amp;nbsp;defines this).&lt;/p&gt;
&lt;p&gt;The problem doesn't arise if the communication is WCF-WCF. You might encounter this only with WCF- non-WCF SOAP (Websphere) communication.&lt;/p&gt;
&lt;p&gt;A very simple solution is to have a custom message inspector which checks if the response message has an ID. If not, it inserts one.&lt;/p&gt;
&lt;p&gt;The code sample is attached.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10060175" width="1" height="1"&gt;</content><author><name>Akshat Sharma</name><uri>http://blogs.msdn.com/Akshat-Sharma/ProfileUrlRedirect.ashx</uri></author><category term="wcf no message id reply void biztalk websphere basic http binding" scheme="http://blogs.msdn.com/b/akshar/archive/tags/wcf+no+message+id+reply+void+biztalk+websphere+basic+http+binding/" /></entry><entry><title>Promoting a WCF message header to BizTalk message context using WCF Adapter</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/akshar/archive/2010/09/10/promoting-a-wcf-message-header-to-biztalk-message-context-using-wcf-adapter.aspx" /><link rel="enclosure" type="application/octet-stream" length="59958" href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-06-01-55/Microsoft.BizTalk.Adapter.Wcf.Behaviors.HeaderPromoter.zip" /><id>http://blogs.msdn.com/b/akshar/archive/2010/09/10/promoting-a-wcf-message-header-to-biztalk-message-context-using-wcf-adapter.aspx</id><published>2010-09-10T06:10:46Z</published><updated>2010-09-10T06:10:46Z</updated><content type="html">&lt;p&gt;Sometimes there may arise a need where some of the custom headers that are specified in the WCF message are needed for routing purposes in BizTalk. Lets take an example, Say the client sends a message with a custom header which specifies the node in a ring to which the message has to be routed to. Let this header be 'RingRouteTo'. Now if you want to enable routing based on this header, &amp;nbsp;this has to be &lt;i&gt;promoted &lt;/i&gt;to the BizTalk message context.&lt;/p&gt;
&lt;p&gt;Some background on how headers &amp;amp; properties are dealt with in WCF adapter:&lt;/p&gt;
&lt;p&gt;1. All headers are &lt;i&gt;written&lt;/i&gt; to the BTS message context.&lt;/p&gt;
&lt;p&gt;2. Some of the well-known headers are always promoted. e.g. "To", "Action"&lt;/p&gt;
&lt;p&gt;3. All the properties with 'http://schemas.microsoft.com/BizTalk/2006/01/Adapters/WCF-properties/Promote' namespace are promoted.&lt;/p&gt;
&lt;p&gt;To promote custom headers to BTS message context, we will make use of point (3). In a custom message inspector, we will read the specified header and then add it as a property with the namespace specified above. We will also need to&amp;nbsp;deploy the custom property schema which has the promoted
properties in BizTalk.&lt;/p&gt;
&lt;p&gt;Of course, you will need to use WCF-Custom adapter in order to use this behavior.&lt;/p&gt;
&lt;p&gt;Attached is the code to achieve the same.&lt;/p&gt;
&lt;p&gt;PS : Once you build and deploy the attached BizTalk project, the property appears as 'Microsoft.BizTalk.Adapter.Wcf.CustomPromotedProperty.PropertySchema.RingRouteTo' in BizTalk.\&lt;/p&gt;
&lt;p&gt;When adding the header while sending the message using client, you can use any namespace for 'RingRouteTo'.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10060155" width="1" height="1"&gt;</content><author><name>Akshat Sharma</name><uri>http://blogs.msdn.com/Akshat-Sharma/ProfileUrlRedirect.ashx</uri></author><category term="wcf adapter biztalk message header promote property routing" scheme="http://blogs.msdn.com/b/akshar/archive/tags/wcf+adapter+biztalk+message+header+promote+property+routing/" /></entry><entry><title>WCF Null binding</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/akshar/archive/2010/09/10/wcf-null-binding.aspx" /><link rel="enclosure" type="application/zip" length="93728" href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-06-01-43/NullBinding.zip" /><id>http://blogs.msdn.com/b/akshar/archive/2010/09/10/wcf-null-binding.aspx</id><published>2010-09-10T05:19:00Z</published><updated>2010-09-10T05:19:00Z</updated><content type="html">&lt;p&gt;I was testing some of my WCF code when I came up with this idea of using a 'Null binding'. Essentially, When you create a WCF service today, you also need a client which can send you message to get your service operations kicked off. The same is the case on the send side as well. When you want to check the client side functionalities you need to have a service to consume that message. This overhead of generating a test client/service and sending/receiving messages using them can sometimes be really time consuming.&lt;/p&gt;
&lt;p&gt;Enter null binding. For testing purposes, this binding comes very handy. You can use this to receive automatically generate messages at specified time intervals. When sending WCF messages you can using this binding as a sink where all messages are just read and absorbed. You don't need to have an actual test client when testing your service.&lt;/p&gt;
&lt;p&gt;This comes very useful with WCF adapter in BizTalk where we make use of * contracts.&lt;/p&gt;
&lt;p&gt;Null binding is also useful for learning purposes. If you are new to WCF and looking for how to make a custom binding, this can give you a some ideas about how to implement one.&lt;/p&gt;
&lt;p&gt;What more can be done:&lt;/p&gt;
&lt;p&gt;On the receive side, add a string property which holds the schema for the desired body. At runtime, generate WCF messages using that schema.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10060143" width="1" height="1"&gt;</content><author><name>Akshat Sharma</name><uri>http://blogs.msdn.com/Akshat-Sharma/ProfileUrlRedirect.ashx</uri></author><category term="wcf null new custom binding transport configuration automatic sink source how to biztalk adapter" scheme="http://blogs.msdn.com/b/akshar/archive/tags/wcf+null+new+custom+binding+transport+configuration+automatic+sink+source+how+to+biztalk+adapter/" /></entry></feed>