Thursday, May 20, 2010

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

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!


  1. Nice article,just a note here that you can get away with this manual workaround by changing code in SysEPdeployment class. refer to EP Devcookbook for details

  2. Hi..

    My requirement is to add new chart control in Dynamics AX web page.. But while adding it in EP web part page its showing the error as "Unable to load content. Please contact your system administrator"
    I tried all the way you specified.. But it didn't worked out for me. Will you please tell me whether is there any alternative way to rectify this error?


  3. Greatly appreciated. It is great to be able to see what the error is!


  4. Very nice post. i found it very useful.
    thanks for spending time on it. it has better understanding.
    i appreciate for you and very useful this your information

    Web Development Dubai

  5. We create websites for customers large and small with innovative designs, visual impact and bespoke levels of functionality.Webbitez are a friendly UK based company with the in-house skills mix to create websites and associated marketing materials. Our core skills include marketing experience, design, professional photography plus coding expertise and programming capabilities. Web Design Belfast Northern Ireland | SEO Belfast Northern Ireland | Logo Design Northern Ireland UK | Hosting Services Northern Ireland UK | Ecommerce Sites Belfast Northern Ireland |

  6. All service providers problems solved with fast, accurate, with a simple phone contact number for all your favourite Websites. Having difficulties with a social network site? Or need help or advice with any social networking issues and cant find a providers telephone contact number? Direct Contact Numbers will cut out all the relentless searching for telephone numbers online. Facebook Helpline Contact Number | Amazon Helpline Contact Number | Gmail Helpline Contact Number | Google Helpline Contact Number | Twitter Helpline Contact Number |

  7. Hi,There is a lot of debate when it concerns the best Web Design Cochin. There are those that think the best business web page design is one filled with all kinds of graphics and data while others will advocate a more sleek and streamlined web page.Thanks......

  8. This is very useful post. Greatly appreciated. It is great to be able to see what the error is! Web Design Manchester

  9. Great information, I really like all your post.
    Web and Enterprise Portals


  10. If its useful do not forget to subscribe to get future update on SSRS Reports tips and Ax ERP
    if You dont want to subscribe please share with your friends or group to encourage me to post more
    But if you will subscribe then you will get update throug email also.

    Ax blog

  11. Thanks for share the quality content, Yasir jamal is a team of highly skilled professionals, dedicated to bring out the best designs for your brand. At Dubai web desinger Services page, creativity is taken to new levels as each and every mind here strives to craft your vision into reality.

  12. That's really a marvelous post. This post contains useful information which helps us a lot. I have never seen such a great post. Your wonderful post can inspire a lot and helps us. I visit your website often and share with my friend.
    Nadkaar - Dubai Website Design

  13. This comment has been removed by the author.

  14. helpful content, i was looking for these tips since long, thank you so much for making it easy for me.
    SEO Dubai

  15. thank you for sharing this information,i appreciate your points
    PR boutique Dubai

  16. Really an interesting and amazing post. Thanks for sharing this wonderful informative article here. I appreciate your hard work.Website Designing Company Bangalore | Web Development Company Bangalore

  17. Your posts are always source of new information for me. Thanks for sharing great posts with us.
    SEO Dubai

  18. I want to appreciate the efforts you put in while writing this blog. Great posts.
    AC repair Dubai

  19. "Usually I never comment on blogs but your article is so convincing that I never stop myself to say something about it.
    This paragraph gives clear idea for the new viewers of blogging, Thanks you. You’re doing a great job Man, Keep it up.
    outsourcing training in dhaka