Our support engineers have assembled the top recommended solutions for you.
Microsoft Dynamics AX 2012CRM Connector in Microsoft Dynamics AX 2012Financials Management in Microsoft Dynamics AX 2012Upgrading to Microsoft Dynamics AX 2012
Microsoft Dynamics AX 2009
Application Object Server (AOS)
Enterprise Portal and Role Centers
Inventory Costing in Microsoft Dynamics AX 2009
SSRS and SSAS Integration
I am very inexperienced with Ax so please excuse me asking what may be a question with a very straightforward answer.
I created a simple Ax service from the client tool, deployed it to the Ax server and can access it successfully from a Windows Forms application.
However, I would like to access this service from Silverlight, but this seems to be more difficult! In order to make some progress I created an intermediate SOAP service which fields the requests/responses from/to Silverlight and passes them backwards and forwards to the AX Service! This works, but surely there must be an easier way?!
It seems that in my .Net 4 SOAP service VS2010 accesses a DotNetConfig35.xsd file which contains all the possible service-model bindings including netTcp, which is what the Ax service uses.
In my Silverlight project however, it seems to use a file called silverlightConfig2.xsd, which only contains basicHTTP and custom bindings, so as soon as I try to instantiate the Ax service client, it raises an exception related to a missing end-point.
I have read many posts elsewhere which contain the words "wcf", "silverlight" and "netTcp", but none of them have helped me! Is there maybe a way to utilise the "custom" binding protocol, or am I really fighting a losing battle here?
Any help gratefully received.
Well, I know little about Silverlight, but why can't you add a direct reference to the service exposed by AOS? As I understand MSDN (How to: Access a Service from Silverlight), it should be supported.
[ Goshoom.NET Dev Blog ]
I believe the main issue is that Silverlight does not support windows authentication.
Dynamics AX MVP | My Blog | Sikich | Twitter @JorisdG
Thank you Martin and Joris for your replies.
Martin - In the Silverlight client project I can add a service reference to the exposed AOS service, VS discovers it correctly, but doesn't generate any binding/endpoint data in the ServiceReferences.ClientConfig file. As a result, when I instantiate the service client at runtime (even though VS generates the code correctly via intellisense) an exception is raised due to there being no suitable endpoint. When I follow exactly the same process in my "Intermediate" service, built as a .Net 4 project as opposed to a Silverlight project, it works perfectly, generating basicHttp binding information in the config file. Intellisense in the Silverlight project offers only "basicHttp" or "custom" bindings, whereas in the .Net 4 project it offers over 20 different binding protocols, including the required "netTcp". With my intermediate service solution, I bind to the .Net 4 service from Silverlight using basicHttp, and the .Net service binds to the Ax service using netTcp!
Joris - This may well be an obstacle further down the line, but at present it is not the issue as I assume that I would at least be able to run the code if this were the case, although I may get runtime access/security problems. However, the intermediate service solution works, presumably without any windows login information from Silverlight.
I don't have enough experience with all this (yet!) to fully understand what is going on (or not going on). Two things stand out however.
1. In a Silverlight project, intellisense only offers me basicHttp and custom bindings. Many posts say that since Silverlight 4 it supports netTcp, but this doesn't seem to be the case according to intellisense?
2. Silverlight apparently only supports tcp comms on port numbers 4502 - 4534. I haven't seen anyone make much of this in any posts, but I suspect this may be the real and final killer blow. Ax allocates service ports from 8101 upwards, and it doesn't seem possible to change this.
I originally wrote the UI in Silverlight using a WCF service (added from within the VS solution, and automatically using port 4502!) to access test data in a local SQL database, and it works well. I naively assumed at the time that I could just redirect the service when required to get data from Ax! I suppose I could access the Ax db directly, but this wrong on many levels!
Should I be using Enterpirse Portal (which we don't actually have installed anywhere!)? Or maybe I have found the only solution by using my intermediate service?!
Thanks again for taking the time to answer.
Can't you simplify your life by configuring the inbound port in AX to use HTTP adapter instead of NetTcp?
Ahah! Yes I'm sure that would make things much easier ... but is it possible? When I examine the Inbound Port via the Ax Client, the adapter shows as NetTcp and is greyed out, as is the "Configure" button! (I am an administrator, so should have all necessary rights if there is a way to do it?).
It indeed is possible. But... the endpoint category must be Enhanced and it the endpoint must be deactivated before changing configuration.
Now this looks interesting! If I have understood this correctly though, I think I need to install "Webservices on IIS", add a "website" and then configure the enhanced endpoint to use this website uri? There is no way of modifying the service which I already have without taking these steps?
If so, then this should keep me quiet for a while!
Yes, you will have to create a new enhanced port, but all of your service code is re-usable. You should be able to select your custom service operations for addition to the enhanced port.
I installed "Webservices on IIS", followed all the instructions, deployed the Port and selected my service operations to expose. I got no errors, but I'm puzzled by the result...
It doesn't show any WSDL URI, and the URI itself appears as "website name/portname/xppservice.svc"
Am not sure how to access this, and am still trying to work out whether this is to be expected or not!
I don't know whether anyone is still looking at this thread, but I could do with a little inspiration if possible ...
I created the enhanced port as mentioned above, but when I activate the port, nothing happens - ie nothing appears in the target webservice directory. There are no errors that I can see, indeed the last message says "the port was deployed successfully".
It does not create the "portname" website sub-directory which shows in the URI. However, if I create this directory, it makes no difference on activation, but if I deactivate the port, it deletes it, so there is some mysterious "connection" which is functioning at least.
Another thing which puzzles me is that if I deactivate the port and click the "Configure AOS" button, the config editor shows that the binding is still netTcp, even though the adapter is HTTP. Should I expect this?
Thanks for any help.
Sorry if I showed you a direction that leads to more troubles... I don't know exactly what's wrong, but I suggest to look to Installation & Configuration training materials, chapter 4 (Services), where the configuration is described. I believe you skipped few steps.About "Configure AOS", that should be correct. I don't know much about WCF routing, but as I understand, HTTP requests are handled by IIS and routed via TCP to AOS.
Other Microsoft Sites
I'm a Customer
I'm a Partner
Use the official Twitter tags:
#MSDYNCOMM | #CONV13