GhostLab website On Mobile Fails To Ping Other Locally Hosted Site Via AJAX - ajax

Testing out Ghostlab on mobile presented an issue when the locally hosted page attempts to ping another locally hosted page via AJAX. Normally, GhostLab will rewrite the URL for you, but since it's an AJAX request I'm assuming it's not rewriting it because it's a dynamically generated URL.
Works fine on virtual machines and host machine with modified HOST file. Fails to load AJAX. The proxy server settings are very limited on GhostLab. Has anyone come across this issue and solved it?

The solution is to run another proxy server because you can't really modify the HOST file on iPhones or Androids without a huge headache.
I ended up using Charles Proxy. I remapped the locally hosted URL to which it was making the AJAX call to my local machine and it fixed everything. Here are the instructions:
1) Open Charles
2) (Menu)Tools/Map Remote...
Add the url you are local hosting to remap any traffic going through Charles Proxy to go to your machine See image example:
Do the same to any other subdomains or domains that are locally hosted on your machine and remap them too.
3) On your mobile device, open settings and select your local Wifi Network.
4) Change the proxy to your machine's IP address and relevant PORT.
5) Attempt to access the website and Grant permission via Charles.
This should fix it all.

Related

Accessing my Local Host from different computer in a different network

I'm current using Xammp,and have created a website in the htdocs. I want to know if i can access this from another computer (not in the same network) and work on the site from that other computer.
You can do this by using the dynamic dns service provided by noip.com. Download the noip client and setup an account in it (try Googling on it).
After that you must edit the conf files in XAMPP to allow outside network to communicate with your network.

Local URL IP redirect via port

I do a lot of custom web development and I am looking for a solution to a problem with testing.
I have a local development server that I run sandboxed environments on. When I need to test something I sometimes will edit my host file to make the domain point at my local IP
In my host file I would have.
127.0.0.1 mydomainname.com
What I would rather be able to setup is if I added a port to a URL:
mydomainname.com:7777
That would then redirect to my local IP
Something like this
127.0.0.1 *:7777
Is this a pipe dream or doable in someway?
You can use Firefox Extension Server Switcher
This firefox extension is a tool for web developers and allows switching between sites on your development and live servers; it helps you to see difference immediately.
It's more easy in use than host file.

JMeter Proxy not recording local sites in IE 8

I am learning JMeterProxy using WAMP and opencart web app.I did a recording using HTTP Proxy Server. I configured firefox and recording went smoothly. But if i am using IE, nothing seems to be recorded. I added a tree view listener in HTTP Proxy to log the recording, nothing is logged in it when i am using IE.
Some observations:
when i stop recording and if i try to access the local site using FF, it is not accessible, but in case of IE i could open the site.
If i browse an external site, recording is working.
I am accessing my site as http://localhost:81/opencart/index.php, since 80 port is used by IIS
My question is.
How would i trouble shoot this kind of scenario.
What changes i should i make in IE proxy settings.
I solved this problem, Here is the solution, as per JMeter documentation
If JMeter does not record browser URLs such as http://localhost/ or
"http://127.0.0.1/", try using the non-loopback hostname or IP address,
e.g. http://myhost/ or "http://192.168.0.2/"
So providing the host name in place of loop back address solved the problem

Viewing Mac Localhost on a network PC

I am developing some websites on my Mac (Standard LAMP setup, with PHP5, Using Remy Sharp's LAMP setup instructions). I can see these sites locally by going to (eg http:// apple.dev).
I was just wondering how I view these sites on a connected network PC.
I have tried:
http:// MY-IP-ADDRESS/~MYUSERNAME/apple.dev
But this just returns the file directory structure for the website.
I can see the default webpage by just going to:
http:// MY-IP-ADDRESS/~MYUSERNAME/
Am I doing anything wrong or do I need to do anything else?
I have enabled web sharing
Any thoughts or suggestions appreciated.
It sounds like you have a server alias setup for this site already. In which case the answer is pretty simple. Just edit the hosts file on your pc and enter the ip of your pc together with the server alias in the usual fashion, e.g.
xxx.xxx.xx.xx apple.dev
Where xxx.xxx.xx.xx = your mac's ip address, as found in web sharing.
If this is done, then your pc should find the site when you browse to that alias in its web browser.

IIS 7 and ASP.Net MVC issue

This is a bit complex - so here we go.
I am developing a mobile web application using asp.net mvc and I need to test it locally on my iPhone. So far I have the first iteritaion of the site running on my local dev laptop. I created a virtual dir for the site under IIS 7 on the same machine. I deployed the site to that folder from VS2008. I open a browser and entered "" and the site cam up just fine. I am runnig a home network with locked down WIFI and both the laptip and my iPhone are on the network. So now I want to test with the iPhone but the site won't come up when browsing to "". I have another machine that is also on the network and I get this error message when attempting to browse to the site:
"Website (laptopname) is online but isn't responding to connection attempts"
I have a feeling that this has something to do with IIS setting and \ or application pools but have not been able to find anything relavent goolging. Any help appreciated.
There are some possibilities:
iPhone is not able to resolve your laptop by name. Try using the IP address of your computer in the URL instead.
The firewall on the laptop is blocking inbound connections from other machines. Check your firewall.
The IIS Website is configured with a host header localhost so it won't respond to requests to other hostnames. Check the binding for the Web site in the IIS Manager.
To eliminate possible network issues, you can create an ad hoc WiFi network on your PC and connect to that network to test.
Check that Allow Anonymous Access is set for the site
I suspect you are not alone, as I had this exact problem. I developed a small port opener I called "SharpProxy" that may make your local testing much easier.
Overview and instructions:
http://www.codefromjames.com/wordpress/?p=97
It's open source! Get code here: https://github.com/jocull/SharpProxy

Resources