Accessing web server running in android emulator from local machine - http

I m trying to access a web server running on android emulator from my machine. I know the reverse i.e how to access the server running on local machine from android emulator ( using 10.0.2.2) . I have searched a lot about this stuff but couldn't get any relevant information.
When the server is up and running inside the emulator I can access it using 10.0.2.15:portNumber. I can do a telnet to the emulator but I wonder how that will be helpful.
Any suggestions on how to get connect to web server running inside the emulator.
Thanks

adb forward tcp:[pcPort] tcp:[androidPort]

Related

Connection between Node-Red running in IBM Cloud and sqlite in localsystem

I am new to Node-Red and SQL Lite, I am trying to connect my Node-Red app running in IBM cloud to the sqlite running in my local pc, I tried to connect by giving the database location like "C:\sqlite\db\SmartBar_DB.db", but is not working.
If Node-RED is running in the IBM Cloud then it has absolutely no access to files on your local computer.
You will not be able to connect from the IBM Cloud application to anything on your local computer.

Azure Cosmos DB Emulator on a Local Area Network

I am trying to access Azure Cosmos DB Emulator through a Mac. The emulator is installed on Windows 10 machine. Both machines are obviously part of the local network. I am able to browse the emulator explorer on Windows 10 machine using the following addresses:
1) https://localhost:8081/_explorer/index.html
2) https://192.168.0.104/_explorer/index.html
However I am not able to browse the emulator explorer on Windows 10 machine using the following address:
1) https://192.168.0.104:8081/_explorer/index.html
I am getting following error message in browser:
The site can't be reached.
<192.168.0.104> refused to connect.
Same is the error message I am getting when I browse through Mac.
I have tried the following:
1) Activate "Private" firewall.
2) Turn off "Private" firewall.
3) Create a rule in firewall to allow inbound connections on port 8081.
4) Turn off all kinds of firewalls (Private, Domain, Public)
If anyone has tried to this before, please suggest what am I doing wrong or if it is even possible?
Use following command to generate a authorization key:
1) Microsoft.Azure.Cosmos.Emulator.exe /GenKeyFile=cosmosdbauthkey
2) Then shutdown the emulator if it is already running.
3) Then delete the emulator’s data directory at following location:
(C:\Users\user_name\AppData\Local\CosmosDBEmulator)
4) Restart the emulator with following command:
CosmosDB.Emulator.exe /AllowNetworkAccess /KeyFile=cosmosdbauthkey
Refer: https://learn.microsoft.com/en-us/azure/cosmos-db/local-emulator#command-line-syntax
Try installing the Cosmos DB emulator using the NoFirewall command.
CosmosDB.Emulator.exe /NoFirewall

Meteor iOS app issue with AirWatch VPN Tunneling

We have developed a mobile app using Meteor+Ionic2. We use our internal NodeJS server which is not in internet zone. We got the app deployed to our enterprise app store which enables AirWatch VPN tunneling to get the access to server in intranet zone.
Everything works great when tested with iOS device level using "F5 Access" VPN when deployed using Xcode or enterprise app store with NO VPN tunneling . But when download the app from our enterprise app store which does per-app VPN using AirWatch VPN Tunneling, iOS app gets stuck at the splash screen. It is not seems to call any client side or server side code of Meteor+Ionic2.
When redeploying it using development distribution, It seems to be stays at about:blank and not going to localhost and getting "Failed to load resource" error in about:blank.
The same AirWatch VPN Tunneling works great in Android. This issue seems to be happening only in iOS. I checked device level logs and also AirWatch VPN tunnel logs which donesn't report any errors.
I'm not sure whether Meteor+Ionic2 supports AirWatch VPN Tunneling for iOS as none of framework codes get called. Is there anyway to debug the enterprise distributed app? Is VPN-Tunneling not supported in iOS app development using Meteor?
Thanks,
Annadurai.
The root cause of the issue seems to be AirWatch config which causes the localhost to be appended with domain name like localhost.mycompany.com. As AirWatch couldn't fix this issue, we dropped plan of using AirWatch VPN tunneling.

Connecting to database in asp.net website by Wp8 app

I created localhost website in asp.net in Visual Studio and i added there a MSSQL connection.
My problem is that I created an app for windows phone 8 but i dont know how to connect this app with database which is on this website.
Can you help me with this?
First of all: your Windows Phone app can't connect to a SQL Server database, so you'll have to create an API.
Since you're using ASP.NET, I suggest to have a look at Web API. In short: you'll have several URL endpoints which return json/xml to your Windows Phone app. It's your job to query the database and return a single item/list of items in the controller of that URL endpoint (this sentence will make sense if you read into creating a Web API).
Next task is connecting to this API. Normally you would host it on a public url, so your phone device can connect to it (a phone doesn't know about your pc's localhost). If you want to use localhost with the emulator for testing, you'll have to execute the tasks mentioned in the quote below as this doesn't work out of the box.
When you create a WCF web service in Visual Studio, by default the
service is hosted in IIS Express and only accepts connections at
http://localhost/. Apps that target Windows Phone OS 7.1 can connect
to the development computer as localhost because the Windows Phone 7.1
emulator uses the network connection of the development computer. The
Windows Phone 8 Emulator, however, configures itself as a separate
device on the network. As a result, an app running on the Windows
Phone 8 Emulator can’t connect to the development computer as
localhost. Before you can connect successfully from the emulator to
the local web service, you have to make two changes:
You have to configure the local web service and web server to accept connections from other devices on the network.
You have to configure the service reference in the Windows Phone app to connect to the service by using the IP address of the development
computer on which the service is running.
Source: https://msdn.microsoft.com/en-us/library/windows/apps/jj684580(v=vs.105).aspx

Access TFS from Azure Service

In my application, I have to show the work items of logged in user. I have tried to pull work items of TFS from the application and It’s working fine on local server, but when it is deployed to the cloud server, it is not working and getting error message saying ‘TF400324 : The remote name could not be resolved’, as a cloud application is trying to ping internal TFS.
Is there any way to connect to internal TFS from the application hosted on cloud server ?
Many thanks in advance..
You can setup an Azure VPN tunnel between your cloud service and your internal network:
http://azure.microsoft.com/en-us/services/virtual-network/
Or you could expose your internal TFS to the internet:
http://msdn.microsoft.com/en-us/library/bb668967.aspx
Or you could use the Azure BizTalk Hybrid Connections to enable the communication:
http://azure.microsoft.com/en-us/documentation/articles/integration-hybrid-connection-overview/
After multiple tries, Service Bus Relay Binding is the one, to ping on-premise environment(internal tfs) from azure cloud server(web role).
The below link works like charm..
Service Bus Relay Binding
Hope It Helps to Somebody who has faced the same issue I've faced. Have Fun..

Resources