Hello,
I have a really weird problem with my ASP.NET MVC Web Application which calls Web Service (custom service) in same AX instance. So both Web Application and Custom Services are running in same AX instance.
If I run my Web Application in my workstation under Visual Studio and call there AX's Custom Services they work perfectly. But If I install Web Application into AX's IIS and then call those Custom Services I get error like below:
No connection could be made because the target machine actively refused it 182.17.64.162:8201
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 182.17.64.162:8201
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SocketException (0x274d): No connection could be made because the target machine actively refused it 182.17.64.162:8201]
System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +273
System.Net.Sockets.Socket.Connect(EndPoint remoteEP) +162
System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout) +685
[EndpointNotFoundException: Could not connect to net.tcp://sfsolar3:8201/DynamicsAx/Services/TETWebServicesForWebUIServiceGroup. The connection attempt lasted for a time span of 00:00:03.0063006. TCP error code 10061: No connection could be made because the target machine actively refused it 182.17.64.162:8201. ]
So, connection from Web Application into Custom Service are refused even if they run in same AX instance.
I have added net.tcp to my Web Applications protocols so there are two protocols http and tcp.net but it didn't help.
What could cause this kind of behavior, what to do to get rid of it and get those two different parts to run in same AX instance?
Best Regards,
Michael