I'm developing an asp.net web application for mobile devices (Visual Studio 2013) and I need an emulator for testing (will run on Windows Mobile 6.5 scanners so the WebMatrix iPhone and Windows Phone 7 are not very helpful). I downloaded the Opera Mobile Emulator and it looks very promising for what I need except that I cannot get connected to my localhost. I am very new at this so please forgive me if this has a simple answer. If I use the URL http://localhost:52285/frmChooseDB.aspx I get "HTTP Error 401.2 - Unauthorized". If I replace localhost:52285 with my IP address (I work remotely so my vpn connection has 2 IP Addresses, 1 for client and 1 for server so I'm using the client IP Address but not sure this is the IP Address I should be using) I get "HTTP Error 500.24 - Internal Server Error An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode." I've tried using 10.0.2.2 instead of my client IP address and get "The page cannot be displayed"
How can I get the emulator to connect to my localhost page? Or if anyone knows of a way I can use the emulators I already have in my Windows Mobile 6.5.3 DTK with Visual Studio 2013, I'd love to hear how.
Thanks.
Related
Good day to all,
I am trying to create my website locally, and perhaps access the website through my phone from the localhost. Forgive me I am just a beginner.
So I used ipconfig -all to find my IPV4 address and it was e.g
192.168.1.102
And on the ASP.net webapplication I ran, the address was:
https://localhost:44337
Hence, I was trying to access this Web Application of mine created on my PC, to be accessed on my phone. On my phone, I entered the address:
192.168.1.102:44337
I went into my firewall setting to add a new rule for inbound connection to allow all ports to be connected as well. But it still don't work. Both my PC and phone is connected to the same wifi.
Does anyone know the fix? Thank you in advance.
You might have to configure an IIS server. This tool comes default in Windows (professional?), and there's lots of good resources on how to do this, all of which do a better job of explaining the process than I could do.
Essentially, you will need to:
Publish your site (Done through visual studio or cli)
Enable and configure your IIS
Create a new website in the IIS manager and point it towards the output of your web app publish
After opening the neccessary firewall ports, check to see in which IP address your web application is running. I am assuming you are using some sort of HTTP webserver software like IIS(windows) or Apache(Linux). In IIS to do that you must go to your site bindings and where it says "IP Address", select "All Unassigned" (NOT localhost or 127.0.0.1)so that the web application runs in all network adapters and IP addresses.
See full IIS documentation here: https://learn.microsoft.com/en-us/iis/get-started/getting-started-with-iis/getting-started-with-the-iis-manager-in-iis-7-and-iis-8
Follow the guide: https://medium.com/#manujsdeveloper/debug-a-website-local-or-remote-hosted-on-an-android-mobile-device-ff2c43527be1
You will need to set your phone in developer mode and get the OEM USB driver specific for your phone. and get a ADB running on your computer
I suggest supplement your knowledge with with links below, as some things are left out in the above guide and vice versa:
https://developer.android.com/studio/command-line/adb
https://developers.google.com/web/tools/chrome-devtools/remote-debugging
I have created ASP.NET API endpoints on my Windows 10 PC, hosted on IIS. Using Chrome's extension app, Postman, I could call the API internally within the same machine (using localhost and even my own local IP). Example:
http://localhost/UserService/api/user/getByUsername?username=abc
and
http://192.168.0.160/UserService/api/user/getByUsername?username=abc
Then I tried using another PC (Windows 7) to connect to the same Wifi LAN that my Windows 10 PC is connected to, and attempted to call the above example URL via Postman, but it did not get through (getting "Could not get any response"error). The Windows 7 PC could not call API hosted on Windows 10 PC.
However, when I reversed the setting ie to host on Windows 7's IIS (version 7.5) and used Windows 10 PC to call instead, no issue found.
What went wrong?? Is it due to some Firewall settings?
A few things to check in Windows Firewall with Advanced Security:
Have you enabled the World Wide Web Services (HTTP Traffic-In) rule
in Windows firewall exceptions?
Do you have any entries in the Remote Computers tab?
Is the action Allow the connection?
What is the content of your Advanced tab like?
EDIT
Based on your comments, the issue is indeed a firewall issue, but not Windows Firewall with Advanced Security. McAfee firewall is blocking external access to port 80. Add an exception to McAfee to allow port 80, and possibly 443. Consult McAfee's knowledge base.
With great help from #reckface, the root cause is found, which is in fact the McAfee antivirus itself. After exploring around the UI, I found the setting to allow incoming traffic for certain port(s) without needing to turn off firewall setting entirely.
With "Web Server (HTTP) Port 80" enabled on the UI, I can now access API's from another PC.
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.
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
On my desktop I run Visual studio web server cassini and fiddler as a proxy, then I connect to a web site running in Cassini using an iPad connected via wireless.
This has always worked since I installed and unistalled the MVC pack for visual studio.
Now I get this message from fiddler (it is sent to the iPad):
[Fiddler] DNS Lookup for "http://175.33.22.116" failed. The requested name is valid, but no data of the requested type was found
There are similar posts with this message, but none of them with my setup.
Can you suggest what to check?
Thank you
This indicates that the traffic from your IPAD client is malformed. Are you using anything in Fiddler (e.g. Tools > HOSTS) to change the traffic? If not, the bug is on the client; e.g. something is trying to connect to http://http://175.33.22.116 which isn't legal (due to the double http:// within the string).