We recently came across an issue where we can deploy the AX 2009 Role Centers and Enterprise Portal successfully, however when we browe to the portal site we get an error message displayed in the SharePoint web page:
“An unexpected error has occurred.” We are running Windows Share Point Services 3.0 SP2
Furthermore, no windows event log entries are logged. This is a very general error message and can occur for a multitude of reasons.
Here is a screenshot of the error:
We identified the issue to be the fact that the IIS Web site was running using ASP.NET 4.0 (V4.0.30319) and not ASP.NET 2.0 (v2.0.50727). The .NET Framework 4.0 got installed as part of Windows Update. So creating and new Dynamics AX 2009 Enterprise Portal Site either through WSS admin and/or AX Setup.exe got created with the framework set to v4.0.
To resolve the issue we reset the .NET Framework for the web site to v2.0.50727.
To change the IIS Web server to run using ASP.NET v2.0 on Windows 2008/2008 R2 do the following:
- Run IIS Manager
- On the left hand pane, select the computer name
- Then, on in the Actions pane on the right hand side, select the link “Change .NET Framework Version” and change it to v2.0.50727
If you are running Windows 2003 R2 SP2 the do the following:
- Run IIS Manager
- Expand the web sites
- Secondary mouse click on the web site hosting the Enterprise Portal, and select properties
- Click on ASP.NET tab, and change the ASP.NET version to v2.0.50727
If you install any of the AX 2009 extensions that use Windows IIS server (Enterprise Portal, Workflow, AIF web services) on a system that already has .NET Framework 4.0 installed, you may experience similar issues as the default ASP.NET handlers may all map to v4.0 and not v2.0. The issue can be resolved by ressetting the .NET framework that is being used by the web sites and/or the appropriate asp.net handlers in use to use ASP.NET v2.0 handlers. If you are familiar with registering appropriate ASP.NET framework, than you can also use the aspnet_regiis.exe command line tool from the appropriate framework folder.