How to get https on the localhost on my mobile device? When I start my .NET Core project on my PC there is https://localhost. But when I try to connect to localhost following these instructions: Access ASP.NET Core 2.1 web app hosted on localhost from mobile device what I get is HTTP. Is generating and installing SSL certificate on IP address the only solution? Or maybe there is another way to check how push messages look like on mobile device?
Related
We have mobile apps installed on Android mobiles and ASP.NET Core web API application deployed on IIS server on Windows 10 Laptop / PC.
my Android phones and laptop are connected to the same WiFi network created with Mobile Hotspot on Laptop, we can reach the IP address from mobile and also able to call web api. (Note: we are not using Wifi Routers)
Scenario 1: Working scenario
Web API deployed with default settings and if access with laptop ip address we are able to hit api successfully.
But due to dynamic nature of the ip address on laptop we have to change ip address every time in mobile app. We would like to avoid this situation by using hostname.
Setting static ip address on laptop is also not solution for us. So we have planned following scenario.
Scenario 2: Proposed solution
Web api application deployed on IIS 10 on laptop, with following settings in IIS
Binding Section :
IP Address: All Unassigned
Port : 4041
Host name : xyz.com
Also made the entry in the host file as
127.0.0.1 xyz.com
Now I am able to access the Web-API from laptop browser with the URL: http://xyz:4041/.
When I use the http://xyz:4041/ on mobile browser I am getting error “the site can't be reached” & “refused to connect”
Pls help me to resolve this issue.
There are many reasons for this error, you can try the following methods to fix this issue:
1.Clear cache and cookies and try again
2.Reset Your Chrome Browser Settings
3.Restart the DNS Client
4.Change the DNS Servers
5.Flush the DNS Cache
6.Reset the TCP/IP Address
I want to learn client - server communication in Android. As per my understating, to communicate with the server we need a valid URL. My doubt is that, can I communicate Android mobile client with the local xammp server???? If yes, please explain me...
Thanks in advance...
yes you can do that if you are using android emulator then use http://10.0.2.2 ip address to access localhost, for genymotion use this http://10.0.3.2.
You can also use Google Chrome's port forwarding but you need google chrome on computer and emulator or device.
if you want to access localhost using port forwarding then open following address on google chrome chrome://inspect and enable port forwarding and set port and ip address.
I have configured openfire server on my laptop running windows7. Pandion and Spark desktop clients are working fine on the localhost. Tested it thoroughly with multiple users.
Laptop is connected to a wifi network.
I am trying to connect to the localhost openfire from Xabber client installed on Samsung galaxy pop running Android OS. Mobile is connected to the same wifi network.
http://localhost:9090/login.jsp?url=%2Findex.jsp
I am able to access this admin url in mobile browser.
But none of the xmpp clients are able to connect to localhost openfire.
Configuration done-
server- localhost
port- 5222
username and password are exactly same as provided in Spark desktop client.
It would be great to know if someone has the solution.
Thanks.
You cannot use localhost in the android client to connect to your laptop. And i do not believe that using localhost in an android browser would connect to a server on your laptop. You have to use the local ip address of the server to connect. Often something like 192.168.#.#.
I'm designing an android app that communicates with a web server. Till now i was hosting the server on my localhost and was accessing it with 10.0.2.2 on the emulator. Now I need to access a server hosted on the company's network PC vserver36 with address 192.168.1.124. How do I do this on the emulator?
You have just to use the address 192.168.1.124 instead of 10.0.2.2 ;)
My web application runs in localhost server. In my emulator the URL is http://localhost:8080/myaction
Is it possible to retrieve the information from the server?
Localhost is device's own loopback interface, if you're trying to access your development machine use 10.0.2.2.
More about it here.