Enterprise Portal: Adding an AX Web Control and Resolving the “unable to load content” Error

02 Nov

Following the tutorial on creating a web part page for Enterprise Portal in the book “Microsoft Dynamics AX 2009 Programming: Getting Started” by Erlend Dalen (Great book by the way!) things seemed simple enough from creating a dataset in AX (page 290) to creating the web part in Visual Studio (pages 291-295). Even the first steps of creating the web part page was straight forward (296-299). However, because my development environment was in 64-bit Windows, when it came to modifying my shared web part, to use the web part that I built in Visual Studio, one additional key step was needed. At first I received the following error message:

‘unable to load content [webcontrol name]. Please contact your systems administrator’

Finding Out What The Actual Problem Is

In order to get to the bottom of what was actually going on, I learned that I needed to modify my main web.config file which is located at:


to give me a more useful message.

1) First, I needed to modify the following line that begins with:

SafeMode MaxControls=”200” CallStack=”false” …

And change the CallStack property to “true

2) Next, I needed to modify the following line:

customErrors mode=”On” /

And change the mode property to “Off

3) Next, I needed to modify the following line:

compilation batch=”false” debug=”false”

And change the debug property to “true

4) I then saved the the web.config file
5) Restarted IIS by executing the IISRESET command in the command prompt
6) Went through the steps of creating the web part page again.
7) I then received a far more useful error, with the first line of the error telling the story:

System.Web.HttpException: The file ‘/_layouts/ep/[webcontrol name].ascx’ does not exist.

The Missing Step

Now knowing that the problem was that my control files didn’t actually exist where SharePoint expected them, I needed to locate the exact path where these files belonged. As it turns out, after searching, the “/_layouts/ep” path is not a physical path on the machine, so I had to find its physical location some other way. How I did this was searching the hard drive for another AX web part that was in the list of webparts that I verified was able to load (so I searched for “ActivitiesListAssociations”). This led me to the physical path of:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\ep

As expected, my custom web control files were not there.

So I copied the .ascx and .ascx.cs files from my project to this path, went through the steps to create the web part page, and web part finally loaded!

Leave a comment

Posted by on November 2, 2011 in Enterprise Portal



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

All About Dynamics 365

Dynamics 365, D365, Implementor

Syed Rafay Ali

This blog contains information about Functional techniques and guidelines in Microsoft Dynamics AX, including tips, tricks, tutorials, tools and upcoming news enhancement in Microsoft Dynamics Ax

Philippsen's Blog

Everyday findings in my world of .net and related stuff

Microsoft Dynamics AX

A great site


All things Blockchain, ERP and IoT

Dynamics Ax

Technical Knowledge


A blog about implementing Microsoft Dynamics AX and Dynamics 365 for Operations

Microsoft Dynamics 365 Blog

Strat your organization's digital translation with Dynamics 365, A Blog by Sandeep Chaudhury

DEVSerra - Dynamics AX development blog

Your official Microsoft Dynamics AX blog.


Discovering Dynamics


A blog by Hai Nguyen

Learn Dynamics Ax with Johnkrish

Live as if you were to die tomorrow. Learn as if you were to live forever - Mahatma Gandhi ****** The more I learn, the less I know - Albert Einstein

Twisted Untwirled

Just another site


Just another site

guyterry's Dynamics AX blog

Just another Dynamics AX blog

%d bloggers like this: