views:

881

answers:

2

Hi Everybody

I am developing a blackberry application and i wanted to access the websites from my localhost( local machine). I am running the application on blackberry simulator 8350.

From my code i can browse request any website from internet and i am getting the response.

When i am trying to give the url as localhost:8080/portal/index.php, its displaying me a erro message

HTTP Error 404 description The requested resource (/portal/index.php) is not available.

I am running my apache webserver on port 8080 over windows.

How can i access my local machine website from blackberry simulator?

Please help and guide me. Thanks SIA

A: 

localhost always points to the machine on which the DNS resolution is performed. In your case that would be the BlackBerry simulator.

To get the simulator to send HTTP request to your dev machine, you need to specify the DNS name or the IP address of that machine. The exact name depends on what your the network configuration of the simulator and your local network is.

Franci Penov
Ok, i did it, but getting the same error message.Oh yes! i am also running Blackberry Email and MDS Service.Also, when i tried access my website from my local machine, is displaying me the page for Blackberry Email and MDS Service.
SIA
As I said, it depends on how the BlackBerry simulator, local machine and local network are configured. I have not used BlackBerry simulator, so I don't know what it does to the local machine networking config, but given your comment, I suspect it duplicates either the IP address or the DNS name of the local machine, hence you hit the BlackBerry services. (Unless you are specifying the IP of the simulator instead of the IP of the local machine :-))
Franci Penov
Thanks for your time.Yes you are absolutely right. i think its duplicating the ip and running on port 8080.How can i configure mds simulator to not to duplicate or to interact my local machine port 8080 (on which i am running apache)
SIA
I have no idea how the mds simulator configuration works. All I could help you with was narrowing down the problem. :-)
Franci Penov
Thanks Franci. Your explanation gave me a idea of how to solve.I will post a reply if i get the solution.
SIA
A: 

The problem is solved.

On My local machine i was running apache on port 8080 and MDS Service was running and binding on the same port.

Simply by changing the port for Apache on my local machine helped me to connect to my local machine and internet from Blackberry Simulator.

@Franci, thanks for your idea.

SIA