Darren Liu's Blog

Is WIF required for CRM 2011?

leave a comment »

The customer asked me today if WIF is really required for CRM 2011 On-Premise deployment without using Claims-based authentication. Hmm… It’s a good question, I know it’s required for CRM 2011 but I don’t really know the reason behind why WIF is required for a pure AD on-premise deployment.

So I did some research and pinged some of my Microsoft friends in the CRM product team. Found out that the reason that WIF is required for CRM is because it is used for claims-based authentication and it’s built into the CRM SDK, and it’s statically linked to the CRM binaries and there’s no easy way to separate them at this moment, therefore it’s required for all deployments.

I’ve learned something new today! :)

Written by darrenliu

05/02/2013 at 12:12 am

Posted in Authentication, CRM, SDK

Tagged with ,

Moving Forward

with one comment

After almost 3 year, I am done with a global CRM implementation for a life science company in California. My travel between Chicago and Los Angeles finally comes to the end. Looking back at the past 3 years, I have learned a lot from this project and this customer. I also got to know many great people and got a chance to build good relationships with everyone of them. I really want to thank my team for everything that they have done on this project.  Thanks to everyone at Microsoft who supported this project as well.

Just for Laugh – Fun Facts for this project

  • Airline Miles:  >1 million miles
  • Hotel Nights: >500 nights
  • Pound of Sushi: >100 pound consumed
  • Celebrated Festivus: 2 times

After the new year, I’ll be heading to a brand new project in Milwaukee, I’ll be missing a lot of airline mile. Smile

Written by darrenliu

12/10/2012 at 4:49 am

Posted in Uncategorized

CRM 2011 – IE 7,8 9 Hangs

leave a comment »

I ran into a problem today that CRM IE7, 8, 9 hangs after 30 minutes because I have many XmlHttpRequest calls on the form.  I found a blog on MSDN that helped me out and I believe all of the us as a CRM developer should pay attention to.  The title of the blog article is Why You Should Use XMLHttpRequest Asynchronously, it’s a good read.

Written by darrenliu

08/27/2012 at 3:28 pm

CRM 2011 Performance Tuning Lesson Learned

leave a comment »

Oh well, when it comes to tuning the CRM 2011 application, there are many things we can do.  The project that I am working on for the past two years is finally finished with performance tuning, I like to write down a few things that I learned from the tuning exercise just in case that I need to do it in the future.  Thanks to my friend, Grant Geiszler for sharing some of the information with me.

  1. Infrastructure
    • Reduce network latency, make sure the network routings to the servers are correct.
    • Make sure the SPNs are setup correct between servers and the different service accounts in used.
    • Make sure the IIS AppPool Recycle time is adjusted.
    • Make sure the load balancer are setup correctly using the correct profile.
      • If using F5 load balancer, please review the Deployment Guide provided by F5. The deployment guide is written for Microsoft Dynamics CRM 4.0 however most of the configuration applies to CRM 2011 as well. The profile that we used has the following settings.
        ltm profile tcp pr_irpc_tcp_120min {
        ack-on-push enabled
        bandwidth-delay disabled
        defaults-from tcp
        idle-timeout 7200
        nagle disabled
        proxy-buffer-high 131072
        proxy-buffer-low 98304
        receive-window-size 65535
        send-buffer-size 65535
        slow-start disabled
        }

  2. Customization/Coding Optimization
    • Reduce the # of REST/SOAP calls, consolidate the client-side calls into a server side plug-in.
    • If you are using the REST endpoint to retrieve related information, only return the fields that are needed.  If returning all of the fields from an entity, it’ll drag down the performance because the return page-size.  We have entities storing a lot of data, the return page-size was up to 5MB, after the optimization and only returning the fields that we need, the page-size reduced to KB.
    • Avoid registering too many synchronous plug-ins, try to convert some of the plug-ins to asynchronous when possible.
  3. CRM Optimization
    • Enable authPersistNonNTLM.
    • Enable WCF compression.
    • Turn off IM Presence Functionality if not needed by updating the IsPresenceEnabled field to false in the OrganizationBase table.
    • Add EnableRetrieveMultipleOptimization (value 2) to the registry under HKLM\Software\Microsoft\MSCRM.
    • Add MaxUserPort (value 65534) and TcpTimedWaitDelay (value 30) to the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters.
    • Monitor the AysncOperationBase table.  Schedule a periodic job to clean up the AsyncOperationBase table.  More information on removing the records from the AyncOperationBase table and to schedule a job to clean up the table, please refer to KB 968520.
    • Reschedule the CRM 2011 Maintenance Jobs. By default CRM 2011 creates 6 maintenance jobs which are scheduled to run daily.  Depends on when the CRM Organization is created, the jobs may run when users are in the system.  You may download the CRM 2011 Maintenance Job Editor Tool to reschedule the jobs.  More information on the tool and how to use the tool, the premier team wrote a post on their blog.
  4. SQL 2008 Optimization
    • Set degree of parallelism from 0 to 1. This disables the parallel execution of the simultaneous operations on the SQL server.
    • Turn Read Committed Snapshot On.
    • Configure the TempDB Drive using the SQL best practice.
    • Validate the Max/Min Memory Configuration.
    • Validate Processor Configuration is set to use Normal mode and not fiber mode.

Anyway, I am sure there are many more optimization that you can do to the Outlook client, IE and the client OS. I hope the above tips can give you a head start.

Written by darrenliu

06/13/2012 at 11:58 pm

Posted in CRM, Performance

Tagged with , , , ,

Installing CRM Using SQL Server DNS Alias

leave a comment »

In most enterprise Dynamics CRM project, the customer would like to install CRM using the SQL server DNS alias instead of the server name. One of the reasons for doing it is because they need to support their Disaster Recovery (DR) strategy. 

CRM does not allow you to use the alias because the Environment Diagnosis Wizard (EDW) did not have the ability to check for a SQL DNS alias, therefore it does not allow you to move to the next step even though it’s supported.

You have two options to solve this problem.

  • Option #1: Install CRM using the actual SQL server name.  After the installation is completed, modify the database connection string in the MSCRM registry and the MSCRM_CONFIG database.
  • Option #2: Add the IgnoreChecks key to the MSCRM ([HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM]) registry to by pass the EDW check to continue with the installation.  Make sure that you setup the DWORD value to “1”. If you are going with this option, please make sure all of your other checks passed before adding the IgnoreChecks key.

Hope this helps!

Written by darrenliu

04/10/2012 at 1:55 am

Posted in CRM, Installation, SQL

Tagged with , , ,

SQL Server DNS Alias

with 2 comments

The customer wants to setup DNS for SQL Server because it’s part of their Disaster Recover (DR) plan.  I learned something from the folks in our team and Grant G from the PFE team on how to do it. Posting the step here just in case that I need to do it next time.

In order to setup a DNS alias for SQL server/SQL cluster, the first step is make sure DNS alias is in place, SPN is setup correctly.  Once the pre-requisites is setup, following the steps below:

1. Execute the following query.

select @@servername

2. One you’ve verified the server name, execute the following SQL query.

sp_dropserver ‘servername’
go
sp_addserver ‘aliasname\instancename’,’local
go

3. After you execute the above query, stop and start the SQL server.

4. Execute the following query again to make sure SQL server is setup correctly.

select @@servername

The steps above assumes that SQL is listening to the default port of 1433.  To configure SQL listen on different port. Please see the following article on MSDN.

How to: Configure a Server to Listen on a Specific TCP Port (SQL Server Configuration Manager)

Written by darrenliu

04/03/2012 at 2:36 am

CRM 2011 Import: An existing connection was forcibly closed by the remote host

leave a comment »

We ran into an issue when importing a solution to few of our environments.  The import failed and we received an error message telling us that “An existing connection was forcibly closed by the remote host.”  We have tried so many different approaches to solve this problem: making the solution smaller, updated timeout values, updated the registry key, etc… The problem still remains.  The pattern we saw was that the import failed and times out at exactly 30 minutes. If the import finishes in less than 30 minutes, everything works.

After days of troubleshooting, we found out that the CRM application server only allocated 1 CPU instead of 2.  We increased the number of CPU to 2 and everything works like a charm!  I guess that’s why IG recommended 2 CPUs at a minimum.

Issue:

Inner Exception: “{Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.”}

Solution:

Increase the # of CPU on the application server.  2 Minimum.

Written by darrenliu

02/29/2012 at 10:00 pm

Follow

Get every new post delivered to your Inbox.