Monotouch Day 2: Images and Icons

As I'm working through the tutorials and other documentation I realize that you're going to need quite a few icons and images for my applications.  A possibility of 11 to be exact, depending on if I'm creating a universal app or targeting only a specific platform.

Here is the summary:

Location Size
App Icon (iPhone)s 57 x 57
App Icon (iPhone hi-res) 114 x 114
App Icon (iPad) 72 x 72
Spotlight and Settings
   (iPhone and iPad)
29 x 29
Spotlight and Settings
   (iPhone hi-res)
58 x 58
Spotlight and Settings
    (iPad Spotlight search results)
50 x 50
iTunes 512 x 512
iPhone Launch 320 x 480
  640 x 960
iPad Launch 768 x 1004
  1024 x 768


There are other optional icons for toolbars and tab bars as well as a specific icon required should you be creating a Newsstand app.

I spend several hours browsing around last night looking for established designers that have iPhone/iPad image design experience but didn't really see any that stood out. The recommendations that I did see were related to using sites like oDesk and to locate freelancers.

If anyone has any recommendations on designers/artists, then please let me know.

Microsoft Security Bulletin MS11-100 and Dynamics CRM

Vulnerabilities in .NET Framework Could Allow Elevation of Privilege (2638420)

Microsoft has release a fix for a security vulnerability identified at a security conference yesterday.  Since Microsoft Dynamics CRM is an ASP.NET application, any servers running CRM could be affected.

Here is a summary of the issue from the above site. Please review Microsoft's recommendations and formulate a plan of action that makes sense for your organization.


General Information
Executive Summary

This security update resolves one publicly disclosed vulnerability and three privately reported vulnerabilities in Microsoft .NET Framework. The most severe of these vulnerabilities could allow elevation of privilege if an unauthenticated attacker sends a specially crafted web request to the target site. An attacker who successfully exploited this vulnerability could take any action in the context of an existing account on the ASP.NET site, including executing arbitrary commands. In order to exploit this vulnerability, an attacker must be able to register an account on the ASP.NET site, and must know an existing user name.

This security update is rated Critical for Microsoft .NET Framework 1.1 Service Pack 1, Microsoft .NET Framework 2.0 Service Pack 2, Microsoft .NET Framework 3.5 Service Pack 1, Microsoft .NET Framework 3.5.1, and Microsoft .NET Framework 4 on all supported editions of Microsoft Windows. For more information, see the subsection, Affected and Non-Affected Software, in this section.

The security update addresses the vulnerabilities by correcting how the .NET Framework handles specially crafted requests, and how the ASP.NET Framework authenticates users and handles cached content. For more information about the vulnerabilities, see the Frequently Asked Questions (FAQ) subsection for the specific vulnerability entry under the next section, Vulnerability Information.

This security update also addresses the vulnerability first described in Microsoft Security Advisory 2659883.

Recommendation. The majority of customers have automatic updating enabled and will not need to take any action because this security update will be downloaded and installed automatically. Customers who have not enabled automatic updating need to check for updates and install this update manually. For information about specific configuration options in automatic updating, see Microsoft Knowledge Base Article 294871.

For administrators and enterprise installations, or end users who want to install this security update manually, Microsoft recommends that customers consider applying the security update using update management software, or by checking for updates using the Microsoft Update service.

See also the section, Detection and Deployment Tools and Guidance, later in this bulletin.

Known Issues. Microsoft Knowledge Base Article 2638420 documents the currently known issues that customers may experience when installing this security update. The article also documents recommended solutions for these issues.

Monotouch Day 1: Getting Started

Boy oh boy, talk about a learning curve. It is not rocket science by any means, but learning how the new tools work, and work together, makes for some long self-education sessions.

The biggest issue that I face is just plain not knowing and/or understanding the various messages that get displayed or reported. As a Visual Studio developer on Microsoft Windows, I usually know what to do when Windows or Visual Studio tells me something. With the Mac and MonoDevelop, not so much.  Again, change of environment, change of thinking.

So, if you happen to be like me, and want to get started with Monotouch, do these things:

Step 1: Purchase these books:

They are all pretty good and each has something unique to share.

Note: I wrote a review of Professional iPhone Programming in 2010 and need to carve out some time to review the others as well.

Step 2: Review the Tutorials and Documentation

While you're waiting for your books to arrive, you can explore the Monotouch documentation.  Xamarin has done a really good job of updating both their documentation and tutorials, which you may find here.


Step 3: Get the Tools

Ok, this may be the first step because without the hardware and software, you can't do any development. I put this as step 3 because it may turn out that you don't like what you see and you choose not to pursue your Monotouch development. If you DO choose to continue, you'll need these things:

A Macintosh

Apple's XCode only runs on a Mac so you'll need one at some point.  I needed a new 64-bit laptop so I chose a Macbook Pro and I just run VMWare Fusion to handle virtual machines that I need for my real job.

An alternative may be MacinCloud, which is a cloud-based Macintosh rental service.  I've not tried this personally but they have Monotouch pre-loaded so this could be an option.

Note: If you've tried MacinCloud, I'll love to hear about it.


Well, it goes without saying that you'll need Monotouch to do development with Monotouch.  However, you don't have to immediately purchase a license. The trial version will allow you to run your code in the simulator which may work for some period of time.  A full license is required to actually deploy to a device.


MonoDevelop is the Visual Studio-like development for Monotouch.  It handles most of the work necessary to talk to the Monotouch compiler, XCode, etc.


Conclusion of Day 1

Well, that's about all there is for Day 1.  I'm still working through tutorials and scanning my books myself.  I think I'll try to connect Macbook to my wide monitor tonight so that I can see the tutorial on one side of the screen and have the development environment open on the other. Working on a 15-inch screen and swapping back and forth proved ineffective for me personally.

21 Days of Monotouch

I have been attempting to carve out time in my schedule to work with Xamarin's Monotouch framework for developing applications on the iOS platform – iPhone, iPad, etc.  ( I also own a license for Mono for Android but that may be another story altogether. )

Finally, due to the inevitable end-of-year slow-down, the time has arrived and I am going to devote a couple of hours a day for the next three weeks or so learning the new tools and platform.

Over the past few months I have been working on the basic design for several iOS applications. During this process, I have accumulated a list of topics and techniques that I need to learn in order to complete my apps.

As part of my learning process, I thought it would be interesting to document my progress in a series of blog posts and I will attempt to publish one article each day.

Now I can't guarantee that I'll be able to publish one per day, but I will certainly try.

If you're interested, then stay tuned.

Developer Tip 'o the Day: Solutions and the SiteMap

This week I learned, again, the importance of including the SiteMap in a custom solution.

If you do not add the SiteMap to your solution, and you've specified that custom entities be displayed within it, then CRM will not be instructed to modify the SiteMap to when the Solution is imported and your custom entity will not be displayed as you expect.

Developer Tip 'o the Day: Ribbons and Web Resources

You can customize the CRM 2011 Ribbon to add additional functionality via buttons, for example.

When you add such a button, you use Web Resources to identify things such as icons and JavaScript functions, like this:



It important to remember that any Web Resources referenced by the Ribbon exist ( added to CRM and published ) before you import your customized Ribbon XML.

If not, then you'll receive an exception and the import will fail.

The exception will probably look something like this:

Exception: FaultException`1
Message: The ribbon item 'MitchMilam.Form.account.MainTab.Save.CloneRecord' is dependent on Web resource id='new_CloneRecord32x322'.
Server stack trace:
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Microsoft.Xrm.Sdk.IOrganizationService.Execute(OrganizationRequest request)
   at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.ExecuteCore(OrganizationRequest request)
   at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.Execute(OrganizationRequest request)
   at VisualRibbonEditor.ServiceWrapper.ExecuteAsync(OrganizationRequest request, Action`1 callback)
   at VisualRibbonEditor.Solution.<>c__DisplayClassa.<Save>b__6(Object sender, DoWorkEventArgs e)

Default Minimum Value for Currency Fields

I just realized that unlike other number fields, the default minimum value for the currency field type is 0:


While it may not apply to all situations, it is probably that the user may need to enter in a negative number so this value must be replaced, with a relevant negative limit. Otherwise, the user will not be allowed to enter a negative amount.

Help get your Dynamics CRM Case Solved Faster using Diagnostics

Dana Martens of Microsoft posted an article on the CRM Team Blog about some tools and techniques that will help you help the support team when you open a support case.

If you submit cases through CustomerSource or PartnerSource, it's worth reading and is something that I try to do whenever I open a case.

Two Options (bit) Fields and the OnChange Event

I noticed something rather interesting regarding the way CRM 2011 handles the OnChange event for a Two Option ( or bit field in CRM 4.0 terminology ).

Bit fields can be displayed in one of the following styles:

Radio Buttons


Note: This is the default configuration.






The OnChange Event

The normal CRM OnChange Event is fired when a person makes a change to a form field then leaves the field ( using either the tab key or the mouse ).  The Two Options fields in CRM 2011 seem to function differently, depending on how the field is formatted on the screen:

Format OnChange Action
Radio Buttons The OnChange event is fired immediately upon making the radio button selection.
Checkbox The OnChange event is not fired until focus leaves the control.
List The OnChange event is fired immediately upon making the radio button selection.


Understanding this action is important because sometimes you need to alter the layout of the form ( hiding or showing items ) based on the setting of a Two Option field.  AND, you don't want the user to have to leave the field to make that change appear. ( that is a very awkward series of actions for a user ).

That means that in most cases, you want to use either the Radio Button format or the List format for a Two Option field so that you get that immediate feedback to the user.