Hi all, i'm not sure my problem's cause is strictly related to NAV but here is where i'm starting from.
I'm developing a Web Form application with .NET framework 4 which calls some functions from NAV codeunits exposed as WebServices. I have already done 3 or 4 other projects like this and all went more or less fine, only on this last project i encountered this error and i can't understand whats the cause and how to solve it. I have already spent 2 days reading all forum posts on this matter, and i see there are many, but still cant find a solution.
I'll try to provide some data about the problem as detailed as possible.
ERROR
Stack Trace: [SocketException (0x274d): No connection could be made because the target machine actively refused it 127.0.0.1:7047] System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +273 System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) +584 [WebException: Unable to connect to remote server] System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) +1176 System.Net.HttpWebRequest.GetRequestStream() +23 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +160 EuroFer.WSref.WebAppUtils.GetItemPrice(String itemCode, String customerCode, Int32 itemQuant) +146 EuroFer.InsertOrder.btn_searchItem_Click(Object sender, EventArgs e) +591 System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +153 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3804
NAV
Version 2009 SP1
Codeunit succesfully published as webservice
"Dynamics Nav Business Web Services" service is running
NETWORK & SECURITY
NAV Server is running on server A, while my project is published with IIS in server B, both A and B are inside company network.
I contacted their system admin who said there are no firewall, router or proxy rules blocking the connecction.
Note: If i copy the link to the webservice in my project reference and i paste it in the browser i actually get a good answer, it shows me the xml fiel with all the functions i'm supposed to see.
CODE
I Added the reference to the project as usual, indeed its all working fine while i'm previewing it from visual studio in debug mode, the error arises when i publish the application on IIS.
Any ideas ?
*This post is locked for comments