Sunday, November 8, 2009

Thursday, November 5, 2009

Issue with installing AX2009 Reporting Extensions on Windows Server 2008 R2 and workaround

Hello all

I just came across an issue where the partner was trying to install Reporting Extensions on a Windows Server 2008 R2 Standard edition, and it fails during the installation of the pre-req IIS components, the error we get is:

[ServerManagerCmd] Error (Id=0) ArgumentNotValid: Feature not valid: 'NET-XPS-Viewer'. The name of the feature was not found.


AX setup uses the following file from the installation media/source \Support\ServerManagerCmdInputIIS.xml to install IIS components and it indeed does have a feature listed


However if you run the command, “servermanagercmd –query”, you will find that on Windows 2008 R2 this feature does not exist, it has been renamed to “XPS-Viewer” (on Windows 2008 it was indeed called “NET-XPS-Viewer”



We were able to workaround the issue by editing the ServerManagerCmdInputIIS.xml, and installation does proceed and complete.


On the partners system there was NO Role Centers and Enterprise Portal (EP) installed although they did have IIS installed but with partial components. The issue only manifests if AX Setup determines it needs to install IIS components if it finds one of them missing or if IIS is not installed at all.

As you can guess the question that was next raised is that is this a known issue and is it issue documented anywhere by any chance? Was it picked up as part of the validation of Windows 2008 R2? Anyone else come across a similar issue? Why do we do a check for the XPS-Viewer feature? What AX extension uses that?

The issue is simple to replicate. Just remove the Web Server (IIS) Role Service and attempt installing the Reporting Extensions, it should fail with an error when it comes to installing the IIS components as per the attached screen shot and log files.

Wednesday, November 4, 2009

How to: Debug User Controls

You can use Visual Studio to debug the code used in User Controls. You can debug when the User Control is being run in the ASP.NET Development Server environment or in Enterprise Portal.

[http://i.msdn.microsoft.com/Global/Images/clear.gif] Debugging in the ASP.NET Development Server Environment

To debug a User Control in the ASP.NET Development Server environment, you must create a Dynamics AX Webpart Page that will run the User Control. For more information, see How to: Test User Controls in Visual Studio.

To debug in the ASP.NET Development Server environment

1. Start Visual Studio.

2. Open the Web project that contains the User Control that you want to debug.

3. View the code for the User Control. Do this by right-clicking the User Control in Solution Explorer, and then clicking View Code.

4. Add breakpoints to the appropriate locations in the code.

5. In the Debug menu, click Start Debugging.

6. In the Web browser window that is displayed, click the file name for the Dynamics AX Webpart page (.aspx) that contains the User Control that you want to debug. Visual Studio should stop execution at the designated breakpoints.

[http://i.msdn.microsoft.com/Global/Images/clear.gif] Debugging in Enterprise Portal

To debug a User Control that is running in Enterprise Portal, you must configure Web project appropriately and enable debugging for the Enterprise Portal Web site.

To debug in Enterprise Portal

1. Start Visual Studio.

2. Open the Web project that you want to use for debugging.

3. Add the User Control to the Web project.

4. If the User Control uses any proxies to access X++ code, right-click the App_Code node in Solution Explorer, and then click Generate Proxies. The proxies that are required to access X++ code will be added to the Web project.

5. Copy the complete URL for the page in Enterprise Portal that contains the User Control that you want to debug. This URL is needed when configuring Visual Studio.

6. Select the Web site in Solution Explorer.

7. In the Website menu, click Start Options.

8. Set the Start action to Start URL. Specify the complete URL for the page that contains the User Control.

9. Set Server to Use custom server. Specify the Base URL for the server that is running Enterprise Portal. For example, http://daxep.

10. Click OK.

11. To enable debugging for the Enterprise Portal installation, right-click the Web site in Solution Explorer. Click Enable Debugging in SharePoint.

[Important]Important

If you do not see the Enable Debugging in SharePoint item in the menu, debugging may have already been enabled for the Web site. You might also have to restart Visual Studio and re-load the Web project for the menu item to be visible.


12. In the dialog box displayed, indicate that you want to enable debugging and click OK.

[Important]Important

Enabling debugging will modify the web.config file for the Enterprise Portal site. We do not recommend that you enable debugging in production environments for Enterprise Portal.


13. View the code for the User Control. Do this by right-clicking the User Control in Solution Explorer, and then clicking View Code.

14. Add breakpoints to the appropriate locations in the code.

15. In the Debug menu, click Start Debugging. The page that you specified will be loaded, and Visual Studio should stop execution at the designated breakpoints.

How to identify the user that was used to change an object from AOT in AX2012

Get the object name for which we need to track these (user and date&time) information's. Login to SQL Server Management Studio an...