This is a migrated thread and some comments may be shown as answers.

Accessing localhost to upload image

8 Answers 305 Views
AppBuilder Windows client
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Idan
Top achievements
Rank 1
Idan asked on 12 Oct 2013, 01:45 PM
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.

8 Answers, 1 is accepted

Sort by
0
Jan-Dirk
Top achievements
Rank 1
answered on 13 Oct 2013, 08:10 PM
Have you tried the machine's ip? Is there a webservice running?
0
Idan
Top achievements
Rank 1
answered on 15 Oct 2013, 08:27 AM
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?
0
Jan-Dirk
Top achievements
Rank 1
answered on 15 Oct 2013, 08:30 AM
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?
0
Idan
Top achievements
Rank 1
answered on 15 Oct 2013, 10:35 AM
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?

0
Accepted
Jan-Dirk
Top achievements
Rank 1
answered on 15 Oct 2013, 10:45 AM
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.
0
Idan
Top achievements
Rank 1
answered on 15 Oct 2013, 10:47 AM
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).

0
Idan
Top achievements
Rank 1
answered on 15 Oct 2013, 10:52 AM
Yeh, the firewall (zone alarm) was blocking the port. thanks a lot!
0
Jan-Dirk
Top achievements
Rank 1
answered on 15 Oct 2013, 11:04 AM
Glad to hear you solved it!
Tags
AppBuilder Windows client
Asked by
Idan
Top achievements
Rank 1
Answers by
Jan-Dirk
Top achievements
Rank 1
Idan
Top achievements
Rank 1
Share this question
or