Monday, May 07, 2012

Install Microsoft Dynamics CRM 2011 on Windows Server 8 (Windows Server 2012)

[UPDATE - March 28, 2013] Microsoft has released support for Windows Server 2012 in its UR13 update. With the availability of UR13, you should NOT need to read this blog post in the case that you intend to use UR13+ as your development environment. If your plan is to not use the latest rollup but rather stay with a rollup prior to UR13, then you can still use the techniques in this blog post. [/UPDATE]

If you like to live on the edge, you might want to use Microsoft latest operating system for your development environment, such as Windows 8. At the same time as a CRM developer, you would probably also want to use a Windows server system as your development environment, so you don't have to use a virtual machine, which consumes more computing resource, and takes longer to start up.

If you have the above thought, you are not alone. I have the exact same thought, which is the reason I generally use Windows server system for my CRM development environment.

During the weekend, I started to build up a new development environment using my new Lenovo ThinkPad T520 laptop (Regrettably I bought a laptop with no touch screen, which you should avoid if you in the market for a new laptop). So my natural thought would be using Windows Server 8 (Update - May 31, 2012, Windows Server 8 is now called Windows Server 2012).

[UPDATE - Sep 8, 2012] I was able to use the same approach to install CRM on the final release version (aka RTM) of Windows Server 2012.

However until I started the actual installation, I didn't realize that Windows Server 8 is not supported by Microsoft Dynamics CRM 2011. Here are the procedure and a few hacks that I used to get the job done. 
  1. Before you launch the CRM installation program, you should first install Windows Identity Foundation (WIF) using Server Manager
     
    It should be noted, you cannot install WIF using the download bits from Microsoft website, since they are not compatible with Windows Server 8. Also you cannot depend on CRM installation program to install WIF for you, it will always fail, since it basically tries to use the WIF installation package from Microsoft download site. You will always get "Installation failed" error, no matter how hard you click "Install" button in the following screen.
     
  2. Secondly, you need to make sure that you have IIS installed first. You can do so by adding Web Server (IIS) role using Server Manager. If you don't have IIS installed, you will encounter the following error during the installation. Having IIS installed will save you this trouble.
  3. Make a backup of svrmgrnc.dll file under your Windows System32 folder, since we are going to overwrite this file.
  4. In order for you to be able to overwrite svrmgrnc.dll file under System32 folder, you need to take over ownership of the file. To do so, you need to find the file under System32 folder, right-click on the file, and choose Properties, then navigate to Security tab, choose Advanced button, then click Change.
  5. Then you need grant yourself Write privilege, or Full Control privilege to svrmgrnc.dll file under System32 folder.
  6. After you have made the proper changes to svrmgrnc.dll file, the next thing you need to do is to find the following four files from a Windows 2008 R2 system, and copy them to your System32 folder of your Windows Server 8 system.
    • Microsoft.Windows.ServerManager.dll
    • rmConfigHelper.dll
    • ServerManagerCmd.exe
    • svrmgrnc.dll
  7. You can now start the CRM installation as usual.
  8. During the installation process, you will be prompted the following error window, just click OK to continue.
  9. As the installation goes further, you will run into another two errors, both are related to Windows Indexing Service which is no longer available for Windows Server 8. Those two errors will not affect the general CRM functionality, except CRM help search function, which I have never found myself in need of it anyway.
    Action Microsoft.Crm.Setup.Common.InstallHelpIndexesAction failed.
    Retrieving the COM class factory for component with CLSID {3BC4F3A1-652A-11D1-B4D4-00C04FC2DB8D} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).


    Action Microsoft.Crm.Setup.Server.StartIndexingServiceAction failed.

    The specified service does not exist as an installed service

  10. If you are as lucky as me, your CRM installation should finish with the following message.
  11. After the installation is done, you should recover the svrmgrnc.dll file that you made the backup in step 2, and also you are now free to remove the other three files from System32 folder.
After all this is done, I had a Windows Server 2012 system with SQL Server 2012, Visual Studio 2012, and Microsoft Dynamics CRM 2011 installed on the same box. I am pretty happy with it.

You might be wondering why we need to replace those four files. The reason is, Microsoft Dynamics CRM 2011 installation program uses a deprecated command line tool called ServerManagerCmd.exe to install and manage Windows features during the installation. ServerManagerCmd.exe depends on a few other libraries including rmConfigHelper.dll, svrmgrnc.dll, and Microsoft.Windows.ServerManager.dll.

Summary Notes

  • This is not a supported approach, so you may or may not want to go this path depending on your development needs.
  • CRM R8 is only inches away from the final release, you may want to wait for R8. There is a hope that CRM R8 might have Windows Server 8 support, which I am not sure at this moment yet. [UPDATE - May 10, 2012] CRM R8 is going to be RU9 (confusing enough? RU9=Rollup Update 9, R8=Release 8), which requires RU6. So in order to install R8, you need to first install RU6, so we don't have a way to install R8 on Windows Server 8 unless you use the hacks illustrated in this blog post. 
  • For your convenience, I have uploaded the mentioned 4 files in a zip file to my Skydrive, so feel free to grab it if that saves you time, or you just don't have a Windows Server 2008 R2 system available to get those files. Unless you really trust me, you may not want to use the file. ;-)
  • Use the hacks at your risk, I make no warranties of any kind.
Thanks for reading, hope this helps.

61 comments:

  1. Could not retrieve current server roles from registry. 'roles' registry key does not exist

    Get this error on installing crm 2011 on the new Azure Hosted platform; RC Windows 2012

    ReplyDelete
    Replies
    1. if you are Facing hotmail account problem Contact Hotmail Outlook Support Nz to solve all Hotmail/Outlook account related issue, call at: +64-9-28-062-35

      Delete
  2. @Alex, check the following forum post to see if it helps.
    http://social.microsoft.com/Forums/is/crm/thread/62864c64-76a8-4d4a-8b4a-634f36d4bc29

    The error might be related to the local version of Windows system that you are using.

    ReplyDelete
  3. I have tried the steps as mentioned in the article. I am facing an error as

    ---------------------------
    Microsoft Dynamics CRM Setup
    ---------------------------
    Action Microsoft.Crm.Setup.Server.EnableAspNetOnWebsiteAction failed.

    The ASP.NET IIS registration utility failed with the exit code 1 and message: Microsoft (R) ASP.NET RegIIS version 4.0.30319.17626 Administration utility to install and uninstall ASP.NET on the local machine. Copyright (C) Microsoft Corporation. All rights reserved. Start registering ASP.NET (4.0.30319.17626) recursively at W3SVC/2/ROOT. The error indicates that this version of ASP.NET must first be registered on the machine. .


    ---------------------------
    Retry Cancel

    Thanks,
    Anil

    ReplyDelete
    Replies
    1. @Anil, I believe you didn't install IIS on your server.

      Delete
  4. IIS8 is installed on the server. Do I need to remove this and install IIS 7.5 manually?

    ReplyDelete
    Replies
    1. @Anil, you shouldn't need to do so. Did you install ASP.NET on the server?

      Delete
  5. I have installed only WIF 3.1.5 and CRM 2011 Prerequisites..

    ReplyDelete
    Replies
    1. @Anil, have you selected ASP.NET 4.5 under .NET Framework 4.5 Features in Server Manager? It should be a problem with your ASP.NET installation.

      Delete
    2. Now I have installed ASP.NET 4.5 as you mentioned. This time I got below error with ASP.NET

      ---------------------------
      Microsoft Dynamics CRM Setup
      ---------------------------
      Action Microsoft.Crm.Setup.Server.EnableAspNetOnWebsiteAction failed.

      The ASP.NET IIS registration utility failed with the exit code 1 and message: Microsoft (R) ASP.NET RegIIS version 4.0.30319.17626 Administration utility to install and uninstall ASP.NET on the local machine. Copyright (C) Microsoft Corporation. All rights reserved. Start registering ASP.NET (4.0.30319.17626) recursively at W3SVC/2/ROOT. The error indicates that this version of ASP.NET must first be registered on the machine. .

      Delete
    3. Something wrong with your IIS and Windows installation. Try to let CRM installation program create a new website instead of using an existing one. If this doesn't help, then you should consider reinstalling Windows Server.

      Delete
    4. Yes Daniel you are correct. My System's OS is upgraded to WIN8 from Windows 2008.

      Anyways I am able to make it working now. I need to install CRM first on Win 2008 and then upgraded the OS.
      Thank you very much for your support.

      Delete
    5. Had the same ASP NET error.

      What worked for me was to go back to add roles in server manager and under IIS select everything that was ASP NET related. Once i did that and restarted the installation, this time it went through fine.

      Delete
  6. IIS 8 not supported, final screen, setup failed.

    ReplyDelete
    Replies
    1. Same error :

      17:06:15| Info| InputResult: Retry
      17:06:15| Info| CrmAction execution time; ConfigureCrmAppplicationPoolAccountAction; 00:05:52.6805492
      17:06:15| Error| System.Exception: Action Microsoft.Crm.Setup.Server.ConfigureCrmAppplicationPoolAccountAction failed. ---> Microsoft.Crm.CrmException: IIS version not supported: 8.0
      at Microsoft.Crm.Setup.Server.Utility.IIsUtility.get_AppPoolIdentityGroupName()
      at Microsoft.Crm.Setup.Server.ConfigureAppPoolAccountAction.Do(IDictionary parameters)
      at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
      --- End of inner exception stack trace ---, Error, RetryCancel, Option1

      Delete
    2. If you guys are using the RTM CD installation package, you may want to trythe latest installation package from Microsoft download website at the following URL.
      http://www.microsoft.com/en-us/download/details.aspx?id=27822

      I believe that's what I used.

      Delete
    3. I was installing with RTM CD but the setup program download the latest installation files from micosoft website before installing... I didn't try with only the package from the website ! And of course i've installed ASP.NET...

      Delete
    4. Hi, I followed all the above steps to install MSCRM 2011 on Windows Server 8 and I managed to install it successfully but when I try to access CRM from IE using http://localhost:5555 or http://servername:5555 URL. I get HTTP Error 404 Not Found.



      -------------------------------------
      cheap nba jerseys

      Delete
    5. Squall - I get the same thing:

      HTTP Error 404.17 - Not Found
      The requested content appears to be script and will not be served by the static file handler.

      I've followed all the steps here, have ALL ASP and .NET Framework role services installed, tried with fresh Windows Server 2012 (with updates) installed TWO TIMES, and same result...

      Delete
    6. @michaelmayo, you can probably try a different port for CRM website. I used 5555 at the time.

      Delete
    7. @michaelmayo @Squall, according to @crmbusiness comment below, you should use Network Service account for the CRM website. It is strange that you guys are having problem, I tried the same procedure on both consumer preview and RTM version, and I had no problem. Could it be the case that you manually created the website for CRM in advance? You shouldn't need to do so. But I am not sure if that's the case.

      Delete
  7. This comment has been removed by the author.

    ReplyDelete
  8. Great! Worked well for me. Consistant with all the information you provided. Thanks!

    ReplyDelete
  9. Doesn't work. After satisfying all the prerequisites I get a prompt asking to install .NET 4, which succeeds despite it being IMPOSSIBLE since I have .NET 4.5. After this, dialogue closes, nothing happens.

    ReplyDelete
  10. Hi, I followed all the above steps to install MSCRM 2011 on Windows Server 8 and I managed to install it successfully but when I try to access CRM from IE using http://localhost:5555 or http://servername:5555 URL. I get HTTP Error 404 Not Found.

    I also installed URL Rewriting Module 2.0 but still unable to resolve the issue.

    You can check the screenshot of the error message on the below link.
    http://social.microsoft.com/Forums/getfile/173479

    Kindly help me to resolve this.

    Thanks

    ReplyDelete
    Replies
    1. @Prathmesh, the screenshot is not available.

      Delete
  11. I managed to install CRM 2011 by using the hacks above and specifying the CRM services as Network service. I appreciate this isn't the most secure way but all the other methods I tried I got IIS 8 not supported error.

    After I did this it was up and running

    ReplyDelete
  12. Hi Daniel Cai,

    Amazing article!!

    Could you tell me the machine specs where you installed the setup in one box?

    Farhan

    ReplyDelete
    Replies
    1. @Farhan, I have a Lenovo T520 laptop with a quad-core processor, 12GB memory, and a 120GB Intel SSD drive.

      Delete
  13. HTTP Error 404.17 - Not Found (StaticFileModule)
    ----------------------------------------------
    1. Go to IIS 8.0 -> Microsoft Dynamics CRM
    2. Go to "Handler Mapping"
    3. Choose "StaticFile"
    4. Click "Revert To Parent" in Action

    I solved the issue. Thanks Daniel :)

    ReplyDelete
  14. Great..Thanks for sharing it.

    http://www.aadseducation.com/microsoft-dynamics.html

    ReplyDelete
  15. Thanks for sharing a useful information...


    Here is the Leading IT Services Provider for Microsoft Dynamics CRM implementations. Raybiztech has worked with clients across all business segments.

    ReplyDelete
  16. I was able to set up the system with these steps, but I´m not able to connect the CRM Outlook Client

    10:07:19| Error| Error connecting to URL: http://srvacc05/XRMServices/2011/Discovery.svc Exception: System.InvalidOperationException: Metadaten enthalten einen Verweis, der nicht aufgelöst werden kann: "http://srvacc05/XRMServices/2011/Discovery.svc?wsdl". ---> System.Net.WebException: Der Remotename konnte nicht aufgelöst werden: 'srvacc05'
    bei System.Net.HttpWebRequest.GetResponse()
    bei System.ServiceModel.Description.MetadataExchangeClient.MetadataLocationRetriever.DownloadMetadata(TimeoutHelper timeoutHelper)
    bei System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)
    --- Ende der internen Ausnahmestapelüberwachung ---
    bei System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)
    bei System.ServiceModel.Description.MetadataExchangeClient.ResolveNext(ResolveCallState resolveCallState)
    bei System.ServiceModel.Description.MetadataExchangeClient.GetMetadata(MetadataRetriever retriever)
    bei System.ServiceModel.Description.MetadataExchangeClient.GetMetadata(Uri address, MetadataExchangeClientMode mode)
    bei Microsoft.Xrm.Sdk.Client.ServiceMetadataUtility.RetrieveServiceEndpointMetadata(Type contractType, Uri serviceUri, Boolean checkForSecondary)
    bei Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1..ctor(Uri serviceUri, Boolean checkForSecondary)
    bei Microsoft.Xrm.Sdk.Client.ServiceConfigurationFactory.CreateConfiguration[TService](Uri serviceUri)
    bei Microsoft.Crm.Outlook.ClientAuth.ClientAuthProvidersFactory`1.GetAuthProviderForDeployment(Uri endPoint, Credential credentials, Uri webEndPoint)
    bei Microsoft.Crm.Application.Outlook.Config.DeploymentsInfo.DeploymentInfo.ValidateAuthProvider()
    bei Microsoft.Crm.Application.Outlook.Config.DeploymentsInfo.SortAndValidateDeployments()
    10:07:19| Error| Exception : Metadaten enthalten einen Verweis, der nicht aufgelöst werden kann: "http://srvacc05/XRMServices/2011/Discovery.svc?wsdl". bei Microsoft.Crm.Application.Outlook.Config.DeploymentsInfo.LoadOrganizations(AuthUIMode uiMode, Form parentWindow)
    bei Microsoft.Crm.Application.Outlook.Config.ServerForm.LoadOrganizations(Boolean forceUI)
    bei Microsoft.Crm.Application.Outlook.Config.ServerForm.b__0(Object sender, DoWorkEventArgs e)
    bei System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
    bei System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)


    ReplyDelete
    Replies
    1. @Sari, it seems that you have provided wrong server URL when configuring CRM Outlook client.

      Delete
    2. I have the same problem. Did you resolve it?

      Delete
  17. Do you know how to add the Now depracated Windows 7 version of Indexing service to windows 8?.

    Any help appreciated.

    Kind regards

    ReplyDelete
    Replies
    1. @james_slater, sorry, I am not aware of a way of adding indexing service to Windows 8.

      Delete
  18. Thank you so much Daniel. Thanks to your help I have now installed CRM 2011 Update Rollup 11 on the same Windows Server 2012, MS SQL 2012 SP1, that also runs SharePoint 2013.
    Worth pointing out a couple of things.
    - Did what Tituah above suggested
    1. Go to IIS 8.0 -> Microsoft Dynamics CRM
    2. Go to "Handler Mapping"
    3. Choose "StaticFile"
    4. Click "Revert To Parent" in Action

    -Had to change the Reporting Services Account to Network Services Account, for the SRS to install.
    -Although Update Rollup 6 is a prerequisite to Update Rollup 11, one cannot install it. However, UR 11 installs with no problem (and same for SRS UR 11)
    -One need to run the following commands on the SharePoint 13 Power shell, in case that an error due to time-out appears:

    $w = get-spwebapplication http://Your_Sharepoint_Website
    $w.HttpThrottleSettings
    $w.Update()

    ReplyDelete
    Replies
    1. @dimitrisv, very good information, thanks for sharing.

      Delete
    2. Thank you very much to you all. All your posts here helped me a lot to getting started on SRV2012 with SQL2012.
      Kind regards, Alex

      Delete
  19. Anyone getting an SQL Server error "An error occurred when attempting to set the SQLSERVERAGENT service to AutoStart"

    ReplyDelete
  20. Finally, I gave up to install CRM2011 on server 2012. After I installed CRM2011 on Server 2008 R2, everything "SEEMS" to work fine. Now, I got other problem to install Dynamics CRM Reporting Extensions.

    Background: My SQL 2012 is installed on Server 2012

    When I do the Dynamics CRM Reporting Extensions installation on SQL server (Server 2012 + SQl 2012), I got error meesage about the Visual C++ runtime 2010 cannot be installed on server 2012. Now, I have no idea what to do next. I have a lot of databases on my new machine (Server 2012 + SQL 2012).

    This piece of software drive me nuts.

    ReplyDelete
  21. This is unsupported, but I altered the registry to get around the IIS version not supported: 8.0 when using domain accounts.

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters

    and changed "MajorVersion" to 7 and "MinorVersion" to 5

    ReplyDelete
  22. Hi i am follow that link but my server it giving error for servermanagercmd stopped working that i can't do forther step please help me

    http://danielcai.blogspot.ca/2012/05/install-crm-2011-on-windows-server-8.html

    ReplyDelete
    Replies
    1. I got that one when I first tried without copying WS2008R2 libraries Microsoft.Windows.ServerManager.dll and rmConfigHelper.dll to System32. When I finally found them from the c:\Windows\winxs folder of the WS2008R2 server and did the copying to the WS2012 server, everything worked exactly as documented in this blog, great thanks to Daniel.

      Delete
  23. Following Daniel's instructions got me up and running for the most part, but I can't access any of the web services. I'm using the links provided by the xrm developer resources page, but XRMServices/2011/Discovery.svc, XRMServices/2011/Organization.svc, XRMServices/2011/OrganizationData.svc all result in a server error 404 - File or directory not found.
    I reset static mapping as per Tituah, but it had no effect.

    ReplyDelete
  24. Update Rollup 13 is due in March 2013 which introduces support for Windows Server 2012
    http://support.microsoft.com/kb/2791312

    ReplyDelete
  25. I was able to get everything working after
    1) installing update rollup 13
    2) then performing setup repair from the original installation files
    *note I attempted setup repair first from the tools folder, but those setup files were not as up to date as the originals I had copied locally and installed with

    ReplyDelete
  26. Hey thanks a lot for updating me as how to Install Microsoft Dynamics CRM 2011 on Windows Server 8. This was really helpful for me.
    Web Based CRM Development

    ReplyDelete
  27. I'm hoping someone on this blog may be able to help me.

    I'm trying to install CRM 2011 on Windows 2012. The installation thinks Net framework is not installed. The role is install and allowed in IIS. There is even another web site using net framework.

    Has any one else encountered this issues

    ReplyDelete
    Replies
    1. @Marianne, if you are trying to do this, the better approach is to use the installation package's self healing capability to update the installation program. The self healing package has been available for a couple of months. Try to click Update button the first thing when you start the installation program. If the automatic Update button doesn't help, you can check Chris Cognetta's blog post at http://cognettacloud.com/?p=781 to manually patch the installation program.

      Hope this helps.

      Delete
  28. Could you please lend these 4 main files.

    Thanks and Regards,
    Shivam Dixit

    ReplyDelete
    Replies
    1. @Shivam, there is a download at the end of the post.

      Delete
  29. @Daniel,

    Thanks. How did i missed that :)

    ReplyDelete
  30. I'm creating a Domain Controller on the same Windows Server 2012 fusionWare VM that I'm installing Dynamics CRM 2011 on.
    1. Microsoft says that having the domain controller on the same box as CRM is not supported. Do you think this will be a problem?
    2. Can I use 'Windows Server 2012' Forest Functional Level and 'Windows Server 2012' Domain Functional Level, or do I need to set this to 'Windows Server 2008 R2' for example?
    Thanks
    Dan

    ReplyDelete
    Replies
    1. @Daniel, the practice shown here is for development purpose only, it is not meant to be used for production environment.

      1. Having domain controller installed on the same box works fine, it is the same way how Microsoft vhd image was setup. However it is not a best practice.

      2. I haven't tried, so I am not sure. I am not particularly concerned about active directory in a CRM development environment, so I usually choose the safe path by selecting Windows Server 2003 forest.

      For SQL Server, Visual Studio and operating system, I do prefer the most recent versions if possible.

      Delete
  31. Not relevant anymore after microsoft release the SHS. installation now is much easier:
    http://dynamics.co.il/crm-2011-installation-on-windows-2012-2/

    ReplyDelete
  32. This helped me install Sharepoint 2013 on Server 2012 R2

    ReplyDelete
  33. Thanks Daniel! Excellent blog!

    ReplyDelete
  34. Anyone tried installing CRM 2011 for Outlook Client on WS2012?

    ReplyDelete
  35. Anyone tried to install CRM 4.0 on Windows 8.1 ?
    I could install the Dynamics CRM for Outlook and it works ...but it seems the Rollups installers includes a security looking at which OS is installed and reject any upgrades as they see it is Windows 8... Someone would know a trick for this ? Any help would be really appreciated ! Thank you guys.

    ReplyDelete