-->
السلام عليكم و رحمة الله و بركاته
Hello and many congrats to all the readers for the new year. With the new year comes new challenges and their solutions. We continue to experience new hurdles and when we successfully handles them, create new blog posts to share our resolution with the readers. I wish this series of NEW thing continues to help us enhance our experiences to perform better in our professional careers :)

This new year eve I spent on my live client only to get surprise to see an error while deploying the changes that I made in the SalesInvoiceReport. After right clicking the report (emphasized due to recent changes)



Actually I added a new design to keep the original layout and created a new one. But all this complexity did not collaborated in the production of this error. I checked the report server is rightly configured in AX (validated the configuration to get all success), checked the report server configuration, it has to be fine since the all the reports were working fine flawlessly. 

Definitely there was something wrong due to some recent things I added. The SSRS report would compile OK, The DP and controller classes would compile fine. The model object... ahan. I compiled the model object to get a few errors. I cant remember the exact error now, and unfortunately I could not take any snapshot then, but one of the errors I remembered said 
'GenerateRdlTask failed'
Googling all this gave nothing exact for my problem. until I somehow looked in the windows event log which removed all the dark clouds in front of me and gave the real picture right in front of my eyes


Exception trace

Generation of the WCF configuration has failed, and the previously saved local configuration will be used.
Exception details:
System.InvalidOperationException: Unable to connect to a Microsoft Dynamics AX WCF service. Ensure that the Microsoft Dynamics AX AOS has fully started and that the requested WCF service is available. See the exception message below for details:
>Metadata contains a reference that cannot be resolved: 'http://myserver:8101/DynamicsAx/Services/MyMisConfiguredWebService'.
   at Microsoft.Dynamics.AX.Framework.Services.Client.Configuration.ClientConfigurationInternal.GetEndpointCollectionFromWsdlUri(String wsdlUri)
   at Microsoft.Dynamics.AX.Framework.Services.Client.Configuration.ClientConfigurationInternal.RetrieveIntegrationPortEndpoints(String aosServer, Int32 wsdlPort, List`1 portInfoList, Dictionary`2 endpointPortMap)
   at Microsoft.Dynamics.AX.Framework.Services.Client.Configuration.ClientConfigurationInternal.RetrieveEndpointsFromMetadata(String aosServer, Int32 wsdlPort, List`1 portInfoList, Dictionary`2 endpointPortMap)
   at Microsoft.Dynamics.AX.Framework.Services.Client.Configuration.ClientConfigurationInternal.ParseWsdlFromAos(String aosServer, Int32 wsdlPort, List`1 portInfoList)
   at Microsoft.Dynamics.AX.Framework.Services.Client.Configuration.ClientConfigurationInternal.GetClientConfiguration()

WCF Configuration

Initially I could not realize this error is related to my issue, deploying a changed report from AOT. But soon I realized this error will generate whenever I will attempt to deploy the report. This means that WCF configuration is always generated whenevr a report is attempted for deployment. I have ye to explore this things. I know that SSRS is based on WCF (and so is the new batch framework, SysOperationsFramework that is).

Architecture with dependency ?

But still should there be a new WCF configuration generation at deployment of each report ? Which will fail eventually if any web service endpoint is maliciously configured ? I think we definitely can have improvements here :)

The exception trace clearly mentions one of my test web service which was long stopped / moved whatever and was not taken care of since a lot of time. I saw a red "minus" icon (common for disabled or not working item representation) along with it. I deactivated it and then deployed the report. The report deployed with no more exceptions

Conclusion

Whenever a report is deployed, the WCF configuration is generated which can fail if any web service is misconfigured. The above stack trace confirms this.

1 comments:

Post a Comment

top