CRM 2011–Cannot publish customizations after import

Problem:

If you ever run into a situation that you imported your solution successfully and not able to publish it, the reason is because either the size of the solution might be too large or the SQL is not fast enough. 

We ran into this problem earlier this week.  We have a slow SQL server and the size of our solution is big, we can’t publish it and we don’t know what was the reason behind it since CRM didn’t provide any helpful error messages.

Cause:

After hours of troubleshooting, we finally figured out that CRM has a default timeout value of 300 seconds = 5 minutes. If any process takes more than 5 minutes, it’ll stop. 

Solution:

Modify the parameters in two different Web.config files:

File 1:

  1. On the CRM application server, open Internet Information Services (IIS) Manager.

  2. Expand the server name, and then expand Web Sites.

  3. Right-click the Microsoft CRM Web site, and then click Open.

  4. Right-click the Web.config file, click Open With, and then click Notepad.

  5. In Notepad, locate the following line.

    <httpRuntime executionTimeout="300" maxRequestLength="8192"/>

    Change to

    <httpRuntime executionTimeout="3600" maxRequestLength="20000"/>

  6. Save and then close the Web.config file.

File 2:

  1. Browse to the folder in which you opened the Web.config file, expand the MSCRMServices folder.

  2. Open the Web.config file with Notepad.

  3. Locate the following line.

    <httpRuntime maxRequestLength="8192"/>

    Change to:

    <httpRuntime maxRequestLength="20000"/>

  4. Save and then close the Web.config file.

I hope this will save you hours if you run into a similar situation.

Comments

  • Anonymous
    October 03, 2012
    I'm also facing the same issue with CRM 2011 online. After solution import we are not able to publish the customizations. our solution size is big, its arrountd 3.6 MB. Any suggestions to resolve this issue in CRM 2011 online? Thanks, Guru

  • Anonymous
    March 13, 2013
    thanks.this worked.i want to konw one thing.will this effect the nonperformance of the CRM

  • Anonymous
    October 09, 2013
    Hi Darren, we have a CRM 4.0 migrated to CRM 2011 Rollup 11. We migrated a solution to a test environment and is successfully imported. This solution is very small and does not contain plugins. Then when trying to publish, CRM shows a error and publication is not achieved. What can it be?

  • Anonymous
    March 26, 2014
    Hi Liu! Just wanted to let you know I was led to your blog by a search to fix my 'publish all' issue....and as usual, your advice worked!

  • Anonymous
    July 16, 2014
    Hi Liu. I cannot find the second web.config file. In the MSCRMServices folder there is no Web.config file. What do you think?

  • Anonymous
    August 28, 2014
    I can't publish customizations aftre successful solution import. We are using MS Dynamics CRM 2013. I can't find the second web.config. After changing the values of maxRequestLength and maxRequestLength in the first Web.config file the problem still exists. Any idea how can we fix it?

  • Anonymous
    February 25, 2015
    Hi, couldn't find the second file but it didn't matter. By changing the first file I was able to publish my solution. Thanks!

  • Anonymous
    June 03, 2015
    worked for crm 2013! Thanks much :)

  • Anonymous
    January 07, 2016
    Worked for 2015 on prem. Thanks a lot !