Monday, August 30, 2010

Debugging Tips with Visual Studio 2010

Some useful debugging techniques for Visual Studio:

http://weblogs.asp.net/scottgu/archive/2010/08/18/debugging-tips-with-visual-studio-2010.aspx

Webservice Testing Tool - WcfTestClient

Windows Communication Foundation (WCF) Test Client (WcfTestClient.exe) is a GUI tool that enables users to input test parameters, submit that input to the service, and view the response that the service sends back. It provides a seamless service testing experience when combined with WCF Service Host.
I didn't know this tool existed until a few weeks ago. Apparently its a part of Visual Studio. I've started digging deep into WCF the last few days and its been an indispensable tool to say the least.

More Info on the tool here:
http://msdn.microsoft.com/en-us/library/bb552364.aspx

Also on a side note, I used to be a big fan of storm and they seem to have a paid version here which adds support to WCF. I don't know how it compares to WcfTestClient though.

Friday, August 27, 2010

Could not establish trust relationship for the SSL/TLS secure channel with authority

I've working on interfacing with a 3rd party web service recently. The development version of the service had an SSL certificate that was issued to different host than the one deployed on. This, as expected, was throwing out "Could not establish trust relationship for the SSL/TLS secure channel with authority" exceptions at run time.

I did some research on how to overcome certificate issues and this link covers most of the techniques available.

More instructions on creating a temporary certificate for development:
Create and Install Temporary Certificates

Please understand there's a reason why the webservice call fails. These techniques should only be used for testing in a dev environment against a trusted service.

Thursday, August 26, 2010

Styles of Programming

I came accross this link while cleaning up my bookmarks:

http://www.codeinstructions.com/2008/10/styles-of-programming.html

I think I fall somewhere between a Surgical and Butcher Programmer.

Friday, August 13, 2010

CRM 2011 New Features And The Wait or Build Decision

Some interesting thoughts on whats new in CRM 2011 and how it affects applications we build today.
http://www.dynamicscrmtrickbag.com/2010/08/06/crm2011-waitorbuild/
http://www.dynamicscrmtrickbag.com/2010/07/25/taking-the-covers-off-crm-2011/

In my opinion, if time permits, I would always try opt for the wait; at least until the beta releases of the product come out.
From my past experiences early adoption has worked out pretty good for us. It gives us the opportunity to offer the customer so much more value in their solution.

The development cycle may not be the smoothest, but at the end of the day the rewards are worth it.

Thursday, August 12, 2010

URL Addressable Forms and Views

The list of addressable Forms and Views in CRM. This came pretty handy recently when setting up a customized navigation for a client.

http://msdn.microsoft.com/en-us/library/cc150850.aspx

Tuesday, August 10, 2010

CRM 4.0 Sitemap Group with id has an empty title Warning

I've been doing some extensive changes to the SiteMap.xml recently. Everything went well and the site loads except that CRM started throwing warnings in the trace log everytime I visited the site.

...
at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
at ApplicationStepManager.ResumeSteps(Exception error)
at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
at HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)
at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
>Sitemap Group with id "grp_Programs" has an empty title (groups have to have titles if their parent area has ShowGroups attribute set to true).
# CRM Tracing Version 2.0
# LocalTime: 2010-08-10 09:21:40.8
# Categories:
# CallStackOn: Yes
...
I did validate the sitemap against the schema while editing the xml, so I'm sure that its well formed and valid. Also, the import process did not complain during the upload either.
(more info on the schema I used at the end of the post)

A little investigating and trial and error I found that the problem lay with the deprecated "Title" attribute in the Group node. (http://msdn.microsoft.com/en-us/library/cc150880.aspx)

Even though the documentation states that attribute is deprecated, it appears that CRM uses it internally. So adding this attribute produces the following site map:
<group id="grp_Programs" title="Programs">
<titles>
<title lcid="1033" title="Programs">
<title lcid="1036" title="[Fr]Programs[/Fr]">
</titles>
...
</group>

I tested this with Rollup update 10 and I'm not sure if that has been fixed with a newer rollup. I might try this again with the latest rollup to see if its still reproducible.

References:
The schema I used to validate contains the customizations.xsd, the SiteMapType.xsd and the Isv.config.xsd files into one file. Download it here:

http://rc.crm.dynamics.com/rc/regcont/en_us/op/articles/sitemap.aspx
http://rc.crm.dynamics.com/rc/downloads/ISVConfigAndSiteMap.zip

Wednesday, August 04, 2010

CRM Update Rollup 12

The CRM team releases a new Update Rollup:
Build number and file names for this update rollup
The build number of the update rollup packages for the Microsoft Dynamics CRM 4.0 server, for the Microsoft Dynamics CRM 4.0 client for Microsoft Office Outlook, and for the Microsoft Dynamics CRM 4.0 E-mail Router is 4.0.7333.2935.
You can download it here. And find the Associated KB article here.

Sunday, August 01, 2010

Assigning Roles to a deactivated Users in CRM

This cannot be done. I found out the hard way when trying to write a user syncing service. It makes sense if you really think about it; why would you want to assign a role to a deactivated user anyway?

If you still want to do this the work around is to temporarily activate the user, assign the roles and deactivate him again.

Hope this helps someone out there.