Skip to main content What is Dynamics 365? Guided tours Customer stories Try our products Build your own agents CRM ERP Sales Service Sales Customer Insights Customer Service Contact Center Field Service Supply Chain Management Commerce Finance Project Operations Human Resources Business Central Pricing Business application topics Training & certifications Migrate to the cloud Documentation Events Dynamics 365 Blog Product updates Onboarding and implementation Community Find a partner Software Development Companies Partner resources Microsoft Marketplace Product documentation Technical support On-premises product support Contact us Try for free Sign in
  • 1 min read

Error “Cannot access a disposed object” when deploying AX 2009 Enterprise Portal on a SharePoint 2010 server


After following through suggestions on deploying Microsoft Dynamics AX 2009 Role Centers and Enterprise portal (RC+EP), we ran across another issue when deploying the RC+EP extensions. We get the following error in the DynamicsSetupLog.txt file:

Entering function ConfigureVirtualServerWithNewApplicationPool

The above error occurs if:

  • You are deploying to an existing web site created in SharePoint 2010 and
  • The application pool user account associated with this web site is not the bcproxy user account

The Application pool associated with the EP web site nust run as the BCProxy user account setup in your AX environment.

To resolve this issue change the application pool account using SharePoint 2010 Administration. Do not directly change the account in the application pool using IIS Manager:

  1. Run SharePoint 2010 Central Administration
  2. Click on Security on the left-hand bar
  3. Under General Security click on Configure managed accounts
  4. Click on the link Register Managed Account and add the BCProxy user account that is setup for your AX environment.
  5. Now change the application pool user as follows. Click on Security on the left-hand bar and then under General Security click on Configure service accounts.
  6. From the Select one… drop-down box, select the Web Application Pool associated with your EP Web site and under Select an account for this component, select the BCProxy user account you just added above, and click OK.
  7. Read the message that is displayed and click OK.
  8. Wait for the changes to apply, and if successful, the Security form will be shown again.
  9. Run IIS Manager, and under application pools, verify that the new account is now displayed
  10. Open up an elevated cmd prompt an run IISRESET.EXE /noforce on all your servers in the farm.

Get started with Dynamics 365

Drive more efficiency, reduce costs, and create a hyperconnected business that links people, data, and processes across your organization—enabling every team to quickly adapt and innovate.