locked
Why is this added to my web.config after I added a web servcie? RRS feed

  • Question

  • User-763603659 posted

    Hi, I'm using VS2013.
    Why did it add my local development machine to the applicationsettings in the web config file after I added the java web service? I then also get a socket exception referencing local host, my local dev PC wont' connect. It's very confusing. I want to connect to the web services APIs not my own local PC. How to address this? Thank you.

    msg "System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it [::1]:8443\r\n at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)\r\n at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address,
    ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)" string

    Monday, June 1, 2015 7:01 PM

All replies

  • User1644755831 posted

    Hello Taichung,

    Why did it add my local development machine to the applicationsettings in the web config file after I added the java web service?

    1. Where is your java web service located? is it on your local machine or on the web?

    2. I suggest you can follow this article to understand how you can do this.

    http://www.codeproject.com/Articles/32313/How-to-invoke-Java-web-service-in-ASP-net-using-C#CreateDotNetWebSite2

    http://forums.asp.net/t/1892799.aspx?How+to+consume+secure+java+webservice+in+Asp+net+

    Hope this helps.

    With Regards,

    Krunal Parekh

    Tuesday, June 2, 2015 10:55 PM
  • User-763603659 posted

    Hi Krunal,

    Your posted link 1 is what I followed to be able to reference the code using a proxy class after adding the api as a web service in the Advanced button area.   The 2nd link is no help unfortunately.

    Sorry, forgot to include what's appended at the end of my web.config, 

    <applicationSettings>
    <TestApi.Properties.Settings>
    <setting name="TestApi_XXXXService_XXXXService" serializeAs="String">
    <value>https://xxx.yyy.com:8443/XXXX/api</value>
    </setting>
    </TestApi.Properties.Settings>
    </applicationSettings>

    This Java web service API is installed by 3rd party vendor at one of our web server.  I found this in their wsdl.  Is this where my web.config auto generated after I added the web reference?

    <wsdl:service name="XXXXService"><wsdl:port binding="tns:XXXXServiceSoapBinding" name="XXXXServicePort"><soap:address location="https://localhost:8443/XXXX/api"/></wsdl:port></wsdl:service>

    Thank you.

    Wednesday, June 3, 2015 11:47 AM