I have Windows 2008 Server with IIS 7.5 and one IP. In the root, / web and / service there are two applications. / web is an MVC4 application, and / service is a WCF 4.0 service.
When I use the service from MVC, I use the following code:
// Create the web request HttpWebRequest request = WebRequest.Create(TripServiceUrl + id) as HttpWebRequest; // Get response using (HttpWebResponse response = request.GetResponse() as HttpWebResponse) { // Get the response stream StreamReader reader = new StreamReader(response.GetResponseStream()); // Console application output tripJson = reader.ReadToEnd(); }
I get the following SocketException:
[SocketException (0x274c): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 10.243.6.43:80] 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
However, I can see 10.243.6.43:80 (internal address) from the browser on the server and successfully call the service. IP is not publicly available.
What configuration do I need to do to make my own reference call the way it works?
Bill sempf
source share