Tag: Windows Server 2012

  • Troubleshooting CRM for Tablets Login Issues with ADFS

    All CRM 2013 and CRM Online customers have access to the CRM for Tablets app that’s available for Windows 8, iOS and Android devices. Since it’s an app from the new age of mobile computing, the users can simply download it from the respective app store of the platform provider and install it. Configuring the app to connect with your CRM organization can however prove to be a bit trickier task than this.

    If you’re using CRM Online hosted by Microsoft in their data centers, connecting the tablet app to the CRM server in the cloud is usually a straightforward process. Just enter the URL for your organization, then punch in the credentials and off you go. Well, to be more precise, upon your first connection the organization you’ll be taken to a screen that asks you to hold on tight while the app is being set up. This is because all of the metadata related to your CRM organization’s customizations first needs to be loaded, so that you’ll see your own CRM instead of some generic, hard coded menus and fields. This step can take quite a while to finish, but just hold on tight, it’s worth it.

    If you’ve got your own on-premises CRM server or you’re logging to CRM Online via your on-premises Active Directory credentials, you may need to work a bit harder to achieve connectivity between the CRM for Tablets app and the CRM server. This is because in both of these scenarios you will have ADFS (Active Directory Federation Services) sitting there in the middle, processing your login request and validating your user credentials. Of course the same technology is also used behind the pure cloud CRM Online service, but MS has done the configuration work for you, whereas with on-premises components you’ll be in charge of performing this.

    CRM_for_Tablets_Were_Sorry

    Recently I was faced with a situation where a customer had deployed Dynamics CRM 2013 SP1 on-premises and done the Internet Facing Deployment via Windows Server 2008 R2 ADFS 2.0, published via Forefront TMG (Threat Management Gateway) 2010. Accessing CRM via the web client through the IFD address was working as expected, so was the CRM Outlook client. CRM for Phones was connecting without issues and I could even connect to the server via tools like XrmToolBox with no issues. There was just one problem: the CRM for Tablets wouldn’t connect to the server, no matter what. In the process of troubleshooting this particular scenario I learned a thing or two about the tablet app connectivity as well as server configuration tasks, so I thought I’d share my findings here on my blog. I’m by no means an expert on anything surrounding ADFS , but I’m stubborn enough to keep searching for answers until I find some from the great wide web.

    RTFM – Read The Friendly Manual(s)

    First of all, you’ll need to know your ADFS version, since there’s a few new hoops you’ll need to jump through when working with Windows Server 2012 R2 and the latest ADFS 2.2 (sometimes referred to as ADFS 3.0, since official version numbers seem to have been dropped by MS, in favor of just shipping ADFS together with Windows Server releases). The architecture of ADFS has changed considerably from earlier 2.0 and 2.1 versions, with no more IIS in the background, so the configuration process for CRM IFD also differs from the previous experience.

    You’ll find the extra steps listed on this article: Configure Windows Server 2012 R2 for CRM mobile clients. On the ADFS 2.2 server you’ll need to enable forms authentication manually, since it’s not enabled by default, like in previous versions. Then you need to run a Powershell script on the CRM server to configure the OAuth provider. Finally, you should register the CRM for Tablets app ID’s with the ADFS server via another Powershell script.

    Tablet_AD_login_promptYou may run into an issue with the login process where the user is prompted for their AD credentials via the standard Windows domain dialog window repeatedly. This is because of some incorrect authentication settings that apparently are caused by the CRM IFD configuration process itself. To avoid these issues, you should run a repair installation on the CRM 2013 server with the Web Application Server role deployed, after you’ve done the IFD configuration and before you attempt to log in with the CRM for Tablets app.

    Another aspect is the requirements imposed by the new Windows 8.1 version of the tablet app. Because of the changes on the OS layer, it’s no longer possible for Win8 apps to connect to any random server at will, but rather the developer has to specify the URL’s of these servers before publishing the app to the Windows Store. For CRM Online the domains for the service are known in advance, but for an on-premises deployment they could be absolutely anything. To overcome this, you’ll need to add a registry entry onto your device before attempting to connect to your server, otherwise the tablet app will just sit there and do nothing. Go to the page Set up CRM for Tablets, expand the section “what the admin needs to do” and grab the Powershell script from there. Running it on your device will prompt you for the CRM organization URL and create the necessary registry key for you. (more…)

  • Dynamics CRM 2011 on Windows Server 2012

    In addition to the shared development and test CRM servers at the office, I like to run my own personal CRM sandbox that allows me to test any applications, configurations and updates without having to worry about affecting any of my colleagues’ work. I’ve been running a VirtualBox server image on my desktop PC and standard hard drives, but even in a single user test environment, you can never have too much performance for your own needs.

    SanDisk_ExtremeAfter reading this blog post from Jeff Atwood, I couldn’t help but to shop around for an “SSD in your pocket”, meaning a super fast USB flash drive that would have sufficient storage space for hosting a CRM 2011 development server image. I decided to grab the SanDisk SDCZ80-064G-X46 64GB Extreme USB 3.0 Flash Drive from Amazon.co.uk for €60 and test it out as a portable CRM sandbox. 190 MB/s read and 170 MB/s write should provide a nice performance boost compared to my old spinning HDD’s.

    Since shrinking my existing VirtualBox image down to the 60Gb available on the flash drive would have meant giving up on a lot of things I had installed there, I decided this was a good moment for building a brand new virtual server. During the fall I had already attempted a few times to deploy CRM 2011 on Windows Server 2012, even though it has been unsupported. Unfortunately none of the workarounds published by Daniel Cai had done the trick for me, so I decided to wait for the official support.

    With Update Rollup 13 Microsoft Dynamics CRM 2011 Server finally became officially supported to be run on Windows Server 2012. However, there was one catch: you could only upgrade an existing Windows Server 2008 deployment with CRM 2011 onto Windows Server 2012. For a brand new deployment there was a disclaimer included with UR13 release notes:

    The Self-Healing Setup (SHS) that is required to install Update Rollup 13 for Microsoft Dynamics CRM 2011 on Windows Server 2012 will be published on Microsoft Update alongside the update rollup in mid-to-late April, 2013.

    Ok, it’s 1st of May now, so where are these SHS files? Well, they are available, but not quite in the kind of format you would expect. You can’t simply download an updated version of the Dynamics CRM Server installer, as the one available on Microsoft Download is still the old version with Update Rollup 6 that was released in January 2012.

    There’s a thread over at Dynamics Community CRM Forum that discusses the Windows Server 2012 installation procedure, but I’ll summarize how I managed to get CRM installed on such an environment. There were a few puzzling gotchas that no one else should spend their time on pondering.

    Get the update files

    The KB article 2434455, “How to obtain the setup updates for Microsoft Dynamics CRM 2011”, gives you the steps you need to follow. Instead of heading to Microsoft Download, you’ll need to visit the Microsoft Update catalog website (which only supports IE, by the way, so don’t click the link on Chrome or anything). From there you’ll be able to obtain a file called Setup Update for Microsoft Dynamics CRM Server 2011. The fun part about this is that the size of the file is 1.5 GB.

    Setup_update_for_CRM_2011_server

    Why is the file so huge, with the actual CRM 2011 Server installer being only 120 MB? The reason is that this file contains all 25 language versions for the update file. If you’re installing the English version, you’ll only need the en-server_kb2434455_amd64_1033 cab file. Oh well, the Internet is fast nowadays and hard drives are infinite, so let’s get on with it.

    Prepare for installation

    The cab file won’t be the installer itself, rather it’s a collection of updates that needs to be references while running the actual server installer. How do you do that then? By creating a config.xml file following the example given in the KB article above and dropping it into the same folder as installer and the cab file.

    Then we can proceed with starting the installation. Only there’s one more catch which isn’t included in the KB article: you’ll need to start the installation process from the command line in order to be able to tell that there’s a config file pointing to a cab file that contains the updates necessary for CRM 2011 to run on Windows Server 2012. You can read through the TechNet article “Use the Command Prompt to Install Microsoft Dynamics CRM 2011” if you’re interested in the finer details of parameterizing your CRM server deployments, but if you’re like me, you’ll just want to copy-paste the required bits onto the prompt to move on with the process.

    1. Put the cab and config.xml in C:\Temp
    2. Download the UR6 version of CRM 2011 Server installer and put the CRM2011-Server-ENU-amd64.exe file in the same folder
    3. Run the file, point it to extract the files onto the very same C:\Temp directory
    4. Cancel any further setup screens that may be launched, as you’ll still need to provide the pointer to the cab file
    5. Open the command prompt, go to C:\Temp directory and type: setupserver.exe /config C:\Temp\config.xml

    This process will make the installer skip the question of “do you want to download updates from Microsoft Update” and use the SHS cab file directly. This is the whole point of our exercise, as Microsoft Update for one reason or another cannot provide the necessary updates for Windows Server 2012 compatibility for the CRM 2011 Server installer.

    After this part, you can follow the standard steps for installing CRM. You may get an error screen saying “Action Microsoft.Crm.Setup.Common.InstallWindowsSearchAction failed. Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))”, but just click Ignore on it as that issue is most likely just about the indexing service for the CRM help files.

    Validate and update once more

    Once you’re done and have rebooted the server, you’ll be able to launch CRM. From those oldskool icons in the Wunderbar area you’ll quickly notice that this deployment is still running a pre-cross-browser era version of Dynamics CRM. The build numbers 5.0.9690.2015 and 5.0.9690.1992 indicate that it is in fact a UR6 organization still. (Hmm, was there ever any need for UR13 to support installation on Windows Server 2012 then?) Before you start working on your environment, download and install Update Rollup 13 to make CRM support the IE10 running on your Windows Server 2012, unless you enjoy using the IE7 Compatibility View.

    Windows_Server_2012_CRM_2011_small

    There we have it. A nice and fast CRM 2011 sandbox image running Windows Server 2012 and SQL Server 2012 in a 36 GB image stored on a very fast thumb drive. I’m sure I’ll be struggling with keeping the image small enough with all the updates, service packs, Office, Visual Studio and other bloat that’s bound to end up there. On the plus side I’ll be able to carry the sandbox on my keychain and plug it into any PC with sufficient memory to run the environment (3.5 GB & 2 CPU reserved for it currently) and enjoy SSD level disk I/O performance. We’ll see if it was worth all the trouble at the end, but hey – don’t we all just enjoy fiddling with the latest software and fastest hardware?

    Edit 2013-05-04: For anyone looking to move completely towards developing for Dynamics CRM on top of Windows Server 2012, please note that the Dynamics CRM Outlook client does not support Windows Server 2012 yet. If you try to run the setup, all you will get is the following message: “Cannot install Microsoft Dynamics CRM for Outlook. Install Windows Server 2008 Service Pack 2, and then try again.”

    Edit 2013-05-04, Part 2: If you’re interested in the detailed steps for building a Dynamics CRM sandbox, please refer to articles like Creating a MS CRM 2011 VM by Mark Kovalcson or Setting up a CRM demo environment in Windows Azure Virtual Machines by Shan McArthur (unfortunately the images on this post no longer work). It doesn’t really matter on which virtualization platform you’re building your sandbox on. I’m using VirtualBox simply because I have other existing virtual machines on it, but with Windows 8 built-in Hyper-V support you don’t necessarily need any additional software. Also, as you can see from Shan’s post, running these environments in Azure is also a perfectly viable option.