Posts

Showing posts from 2013

OneWay vs Async in WCF

Image
Download the sample code here:  http://milestonetg.com/examples/OneWayServiceExample.zip On a recent project, there was some debate about the behavior of OneWay OperationContracts, so I thought I'd put together a little example. Specifically, the debate centered around when control is returned back to the calling routine. Let's take a look at the MSDN docs... http://msdn.microsoft.com/en-us/library/system.servicemodel.operationcontractattribute.isoneway(v=vs.110).aspx " Use the  IsOneWay  property to indicate that an operation does not return a reply message. This type of operation is useful for notifications or event-style communication, especially in two-way communication.  " " Specifying that an operation is a one-way operation means only that there is no response message. It is possible to block if a connection cannot be made, or the outbound message is very large, or if the service cannot read inbound information fast enough. If a client requires a

Unable to Configure the Microsoft Dynamics CRM 2011 Client for Outlook against Dynamics CRM Online in a Virtual Machine

I came across the error in this article when trying to configure the CRM client for Outlook... Error connecting to URL: https://myogranization.crm.dynamics.com/XRMServices/2011/Discovery.svc Exception: System.ArgumentNullException: Value cannot be null. See this kb article... http://support.microsoft.com/kb/2498892 For me, the installation was fine.  The issue was my environment.  I use a Mac and run Parallels to host my Windows 8 VM.  By default, the user home directory when using Parallels is the home directory on the Mac, not in the Windows VM.  So, to Windows and your Windows applications (in this case, the CRM Client and Outlook), this appears, and behaves, as a remote share.  CRM Client for Outlook stores the off-line data files in the user's AppData folder in their profile. The CRM Client Plug-In uses SQL Server CE 3.5.  This version of SQL Server CE does not support access on remote shares, so the sync process fails when it tries to create and write to the data file

Using Azure Service Bus Shared Access Signature with NetMessagingBinding in WCF

I Googled, Binged, and scoured internet and various documentation and could not find this setting.  I was able to reverse engineer the declarative markup based on the properties in the classes and code samples. If you want to use the shared access signature authentication with the netMessagingBinding in WCF declaratively in your web.config or app.config, here's how.... Given the service bus connection string.... Endpoint=sb://acme.servicebus.windows.net/;SharedAccessKeyName=efudd;SharedAccessKey=f9JFgRYdLdnPTQv4/EC5ixt4iHVUSTCnhOg1uep9lsW= The configuration for your transportClientEndpointBehavior looks like this... < transportClientEndpointBehavior > < tokenProvider > < sharedAccessSignature keyName ="efudd" key ="f9JFgRYdLdnPTQv4/EC5ixt4iHVUSTCnhOg1uep9lsW=" /> </ tokenProvider > </ transportClientEndpointBehavior > Happy Coding!