Accessing localhost to upload image

9 posts, 1 answers
  1. Idan
    Idan avatar
    76 posts
    Member since:
    Oct 2012

    Posted 12 Oct 2013 Link to this post

    How do I connect to a webservice on localhost in Icenium graphite. I tried the machine name, localhost, 127.0.0.1 but nothing works. I try to upload an image through a webservice using FileTransfer() but always failed and get null as the error value.
  2. Jan-Dirk
    Jan-Dirk avatar
    327 posts
    Member since:
    Jun 2012

    Posted 13 Oct 2013 Link to this post

    Have you tried the machine's ip? Is there a webservice running?
  3. Idan
    Idan avatar
    76 posts
    Member since:
    Oct 2012

    Posted 15 Oct 2013 Link to this post

    Hi Jan,

    I tried the ip that I get from CMD ipconfig in the IPv4 address but when I use that IP in the browser it doesn't load the webservice nor other webspages.

    However this address works.
    http://localhost:1691/default.aspx

    But this doesn't:
    http://192.168.1.5/default.aspx

    I want to be able to debug my app when my phone is connected and with Visual Studio on the local machine.

    Any other ways to resolve this?
  4. Jan-Dirk
    Jan-Dirk avatar
    327 posts
    Member since:
    Jun 2012

    Posted 15 Oct 2013 Link to this post

    By the port number in the first URL it looks like you are running the web service from within Visual Studio directly.

    Does it work if you use http://192.168.1.5:1691/default.aspx?
  5. Idan
    Idan avatar
    76 posts
    Member since:
    Oct 2012

    Posted 15 Oct 2013 Link to this post

    I changed the binding in the applicationhost.config for IIS Express8:

    <bindings>
    <binding protocol="http" bindingInformation="*:5555:" />
    </bindings>

    Now I can access the site/webservice from the browser like this:

    http://192.168.1.5:5555/default.aspx

    However, when I put this address in the mobile phone which is connected to the local Wi-Fi network, It still doesn't connect.

    Anything else that I might be missing here?

  6. Answer
    Jan-Dirk
    Jan-Dirk avatar
    327 posts
    Member since:
    Jun 2012

    Posted 15 Oct 2013 Link to this post

    What exactly is your web service returning? Since you are calling default.aspx it makes me think it is returning a web page (with html?)?

    Web services generally are named (in Visual Studio) webservice.asmx and return formatted data (json, xml)

    Could it be your firewall is blocking port 5555? Try to disable the firewall during test.
  7. Idan
    Idan avatar
    76 posts
    Member since:
    Oct 2012

    Posted 15 Oct 2013 Link to this post

    The webservice is:

    http://192.168.1.5:5555/ImageWebService.asmx/

    I just gave the url as an example for accessing the server

    The webservice works perfectly when I put it on an external server on Amazon, but I need to access it locally for debugging purposes in visual studio (debugging server side code).

  8. Idan
    Idan avatar
    76 posts
    Member since:
    Oct 2012

    Posted 15 Oct 2013 Link to this post

    Yeh, the firewall (zone alarm) was blocking the port. thanks a lot!
  9. Jan-Dirk
    Jan-Dirk avatar
    327 posts
    Member since:
    Jun 2012

    Posted 15 Oct 2013 Link to this post

    Glad to hear you solved it!
Back to Top