locked
httpclient connection to tomcat on localhost

    Question

  • I have  windows store application that is accesing web service using HttpClient.

    Web service is running on my local Tomcat server, on port 8080. When I try to access my locat Tomcat, I get error "Connection wiht server can not be established". If I type the same URL in the browser, it is working. 

    If I try to acces some other URL that is not on my local PC, it is also working.

    Any idea why I can not access URL from HttpClient in windows store app ?

    Thursday, March 20, 2014 6:21 PM

Answers

All replies

  • store apps cant connect to localhost..

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Thursday, March 20, 2014 6:50 PM
  • actually, I am using IP adress in URL, not "localhost".

    It was working before, app is one year old, and i am developing it all the time in VS2013 and local Tomcat as server. It has suddenly refused to connect to local tomcat.

    Can it have something to do with last Windows update this month ?

    Friday, March 21, 2014 9:37 AM
  • if you run the package from visual studio it will work. but when you downloaded the app from the store it wont work.

    if you open the project properties

    go to debug, there you have an option allow local network loopback which have to be enabledd


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Friday, March 21, 2014 12:47 PM
  • the problem is that it is not working when I run it from Visual Studio, and I still did not manage to solve it.

    I have checked "Allow Local Network Loopback", it is enabled.

    I have also tried HttpClient Windows 81. Sample (also from Visual Studio), but the problem is the same.

    On my other PC with windows 8.1 and VS 2013 I can connect to localhost from same VS project without problems, and also I can connect to the HTTP Server on the PC where connect to localhost is not working.

    I can not find what is different on those PC's, any suggestions ?

    Sunday, May 18, 2014 9:11 AM