I have coded a C# MVC Internet Application with Visual Studio 2013 Express for Web on my laptop. I can compile and connect to this application with the following web address in my laptops browser: localhost:22101/
I am wishing to connect to this address in an Android application that I have coded, but am having some trouble connecting to the localhost on my laptop. My laptop is connected with a USB cable.
I have tried the following:
Tried to connect to my laptops IPv4 address from ipconfig
(10.1.1.3)... no connection found.
Tried to connect to 10.0.2.2... no connection found
My laptop and cell phone are both connected to the same wireless router.
Is this possible? Can I please have some help with this?
Thanks in advance
The local development server doesn't respond to external requests.
You will need to run it on a full blown iis I'm afraid.
Related
I am working on a project where an Android application sends data via UDP to a Unity application on a Windows server. I can confirm that it works correctly with two different Windows machines. On a third Windows machine, however, nothing is being received.
What I have tried in detail:
The Android device is connected to the Wifi hotspot of the respective Windows machine
Therefore the server ip is always 192.168.137.1, and I have tried different port numbers like 8888, 11000, 60320
All firewalls are disabled on the Windows machines
Could someone please give me a hint, what else I should try?
Currently I have webservice using dnx hosted on a specific ip address and connecting to it works fine. The service is listening at port 5004 so inorder to connect to it I use the following format
http://192.X.X.12:5004/api/somePar/?...
Now I moved the webservice to Azure and I use the following address to Remote Desktop onto the virtual machine on which it is hosted.
http://MyLink.cloudapp.net:54254
Now I am attempting to connect to it using its web address.Inside the virtual machine where the weservice is hosted if I type
http://127.0.0.1:5004/api/somePar/?.. (WORKS)
The above works. The ipconfig of the machine gives me say A.B.C.D. If I use that as such it fails.
http://A.B.C.D:5004/api/somePar/?..
I guess that is another reason why my other machines cant connect to the webservice hosted on that machine. Any suggestions on why the ip address of the machine fails and the webservice only works with 127.0.0.1
How can I fix this ?
What OS is the virtual machine running? I had this exact problem with a machine running Windows 7 Professional; apparently, if you're running Windows on that VM, it needs to be Windows Server.
Check the binding, it should specify All Unassigned.
And try changing your port to 80 because 5004 is Real-time Transport Protocol used by Real Time Streaming Protocol (RTSP) for Microsoft Windows Media streaming services and some other things and may be locked.
I have the app for Android and another app for PC, both were written by me. Android app connects to the PC app, and the PC app sends data (in realtime) to the smartphone.
The problem is: if the PC is connected to the mobile wireless network, I can't get its address, so I can't connect my Android app to the PC.
So, is there some simple application (for Windows), that I can use as a server for data forwarding. PC and mobile App will be connected to this server (launched on the station with the static address), and the server will just forward data from one app to another?
Or maybe there are good tutorials for creating such kind of server on C#/Java?
I would use a third pc (a server) that acts as a bridge for Android and PC. I wrote a web service in .NET for a virtual server on the internet. Both Android and PC know the ip address (or the domain name) of the server.
The PC talk to server using .NET native web service call, the Android uses ksoap.
For more infomration about ksoap for android look here:
http://code.google.com/p/ksoap2-android/
EDIT:
I suppose you can have the web server in the pc but you need to configure your modem to forward specific ports to the pc. But if you have no static ip address you need to reconfigure the ip address on Android device everytime your modem is rebooted (or switched off/on). You can also try to use dynamic dns services...
Check this out:
http://whiletrue.blog.com/2013/07/11/smartphone-as-pc-controller/
I've made this with Muzzley. Basically, you already have most of the work done if you integrate with it.
(disclaimer: i work for this project)
On the PC side, you can use the lib to include in you pc app in several languages:
(java) http://www.muzzley.com/documentation/libraries/java.html
(.NET) http://www.muzzley.com/documentation/libraries/dotnet.html
(nodejs) http://www.muzzley.com/documentation/libraries/nodejs.html
On the smartphone side, you can use any of the existent widgets (virtual interfaces):
http://www.muzzley.com/documentation/widgets.html
or eventually make your own:
http://www.muzzley.com/documentation/widgets/webview.html
Example:
You can pull from github several examples here:
https://github.com/muzzley/muzzley-demos/
(check the the webview example)
I hope it helps.
In developing my app I face the following problem:
I need to check if a remote data service (running on IIS) is available from the phone. This requires the phone to be on the same network (same IP range). How do can I check if the phone has wifi, and if the remote server is reachable?
Thanks in advance :)
How can I get the IP of a computer that connects to my Pocket-PC ?
I need to see this IP in my Pocket-PC.
I work on VS2008 C# Windows-mobile
Thanks in advance
The ActiveSync connection itself is an RNDIS network, so the device and the PC have their own addresses in that network. You can resolve "ppp-peer" to get the address of the PC in that network, but it won't tell you anything about the other network connection(s) of the PC.
To get that information, you would have to put an app on the PC that the device would talk to, and that app would provide the info you're after.