Connecting to LocalHost using PocketPc Emulator

R

rbfigueira

Friends,

I am developing one application (Pocket PC) and i am using
the (Pocket Pc Emulator) to do the tests.
I have to use/read one xml file that are on my own machine
server (localhost).
That file will be on Internet BUT i want to simulate using
my local server (localhost), avoiding connecting to web.

How can i configure the emulator to connect to my server
(localhost) ?

I have read this article:
(Using the Emulator in Smart Device Projects)
http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/dv_vstechart/html/grfusingemulatorinsmartdeviceprojects.
asp

I have all steps but did not work... perhaps i am doing
something wrong...

I am running the emulator on the same machine (my Laptop -
acer aspire) with vs.net 2003 and perhaps my configuration
(Connections) is wrong.

I have used "configuration a connection with no proxy
Server"
- to configure PocketPC 2002 or Pocket PC 2000 with no
proxy server

The problem is that i can't view my webpages that are
stored on my machine server (localhost). Like I said I
have to use some files stored on my machine server
(localhost) on one application that i am doing with
compact Framework.
That files will be on Internet BUT i want to simulate
using my local server (localhost), avoiding connecting to
web.


My Laptop settings:
Pc name: laptop
Pc IP: 127.0.0.1
Connect Internet: Dial-up Connections (phone line)


I have made this:
++++++++++++++++++

To configure Pocket PC 2002 or Pocket PC 2000 with no
proxy server

Click Start on the emulator, click Settings, click the
Connections tab, and then click Network Adapters.
Under Adapters installed, click DC21X4 Ethernet Driver,
and then click Properties.
Click Use specific IP address, and then enter 192.168.0.2
in the IP address box, and 255.255.255.0 in Subnet mask
box.


To install the Microsoft Loopback Adapter in Microsoft
Windows 2000

In Windows Control Panel, double-click Add/Remove
Hardware, and then click Next.
Click Add/Troubleshoot a device, and then click Next.
In the Devices list, click Add a new device, and then
click Next.
Select No, I want to select the hardware from a list, and
then click Next.
In the Hardware types list, click Network adapters, and
then click Next.
In the Manufacturers list, click Microsoft.
In the Network Adapter list, click Microsoft Loopback
Adapter, and then click Next.
Click Next, and then click Finish.
++++++++++++++++++

I have tried without the Loopback Adapter because my
Laptop have a Network adapters (Realtek RTL8139(A)-based
PCI Fast Ethernet Adapter) BUT did not work !! :(

I am testing the emulator connection on my local pc like
this:


I have tried this on the emulator (Pocket IE):

http://laptop/mypage.aspx

The page you are looking for cannot be found

http://127.0.0.1/mypage.aspx
Trouble connecting
Unable to connect with current settings. To change your
connection settings, tab settings.
[ok] [settings]

I have tried many ways and ... not work!!

After some hours.

I tried to view, with the emulator, some Internet pages,
and i recived this error message:
Trouble connecting
Unable to connect with current settings. To change your
connection settings, tab settings.
[ok] [settings]

Somethink is wrong!! I went to my PDA (Toshiba e330) and
tried to connect to Internet and ... this work fine.
I went to connections of my PDA and see that he has using
one proxy ?!?! I haven't put anything there?
The proxy is "pbtproxy01" ???!!

Note: My browser (Internet Explorer) doesn't have any
proxy on there!!!

Ok, lets change the Emulator settings...

I have put that proxy on the connection settings and ... i
can see Internet pages from Pocket Pc Emulator ;)
Great... now lets try this links (Pocket IE):

*** connecting to internet (on-line) ****
http://laptop/mypage.aspx

error:
Unknown host
Description: Unable to locate the server named "laptop" ---
the server
does not have a DSN entry. Perhaps there is a misspelling
in the server name,
or the server no longer exists.
Double-check the name an try again.

http://localhost/mypage.aspx

error:
The page you are looking for cannot be found


http://127.0.0.1/mypage.aspx

error:
Internal error - server connection terminated~
Description: Internal error - server connection terminated


******************************************

*** NOT connecting to internet (off-line) ****

http://laptop/mypage.aspx

error:
The page you are looking for cannot be found


http://127.0.0.1/mypage.aspx
or
http://localhost/mypage.aspx

error:
The page you are looking for cannot be found

******************************************

Note: I have Test that pages connected to the normal
Internet Explorer and then all work fine.


When i am connection to Internet i received some different
error that point to some solutions...
When i NOT connected to Internet i received only the
message that "The page you are looking for cannot be
found". Note that I want to work off-line!

Why i did not received the same messages????

Ok, now what can i do? Any idea?

I have a bad connection (phone line) and it is not
practical ($$$$) to do all tests connection to Internet!!

Using my IP did not work, also :(

Here is my settings:

+++++++++++++++++

[ ping laptop ]

Pinging laptop [169.254.25.129] with 32 bytes of data:
Reply from 169.254.25.129: bytes=32 time<10ms TTL=128
Reply from 169.254.25.129: bytes=32 time<10ms TTL=128
Reply from 169.254.25.129: bytes=32 time<10ms TTL=128
Reply from 169.254.25.129: bytes=32 time<10ms TTL=128

Ping statistics for 169.254.25.129:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms


[ ipconfig ]

Windows 2000 IP Configuration

Ethernet adapter Local Area Connection 2:

Connection-specific DNS Suffix . :
Autoconfiguration IP Address. . . : 169.254.25.129
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :

Ethernet adapter Local Area Connection:

Media State . . . . . . . . . . . : Cable Disconnected


[ Computer settings - Network ]

Full computer name: laptop.
workgroup: WORKGROUP

+++++++++++++++++++

When i do this on my Internet explorer browser:
When i do http://laptop/mypage.aspx (laptop is my computer
name) it work fine.
When i do http://169.254.25.129/mypage.aspx (this ip is
the "ping" of my computer name). Don't work
like "laptop"...it will force to connect to Internet ...
if i do "connect" it will connect to Internet.


On my pocket pc emulator nothing work....


The first weird think is that i don't use any proxy to
connect to Internet and on my PDA (Toshiba e330) i went to
connections and see that he has using one proxy ?!?! I
haven't put anything there?
The proxy is "pbtproxy01" ???!! If i remove that from my
device i will not connect to Internet.
I only can connect to internet using the emulator if i put
that proxy... but i cant connect to my local machine
server ....
I have tried to use my machine IP and my computer name and
did not work.


Note: Sorry the long posts but i am trying to put this to
work and i can't... i give all the settings that i have on
my laptop.

Anyone knows what is wrong???
 
C

Chris Tacke, eMVP

And keep in mind that, to the emulator, localhost is *not* your PC. Do not
use the string "localhost" for any development work.
 
R

rbfigueira

Sorry, but i have made all what you have said BUT did not
work !!

Is necessary to do more thinks ?

Please, tell me what i have to check and all settings i
have to put...
Please help me on this...
Thanks for all friend ;)

Note: Perhaups this helps... I also have tried to put
LoopBack (Sharing enable) but i recivied this error:

An error occured while Internet connectiong sharing was
being enabled.
Internet connection sharing cannot be enable. The LAn
connection selected
as the private network is either not present, or is
disconnected from the network.
Please ensure that the LAN adapter is connected before
enabling Internet Connection Sharing

I am trying everythink BUT nothink work :(
-----Original Message-----
And keep in mind that, to the emulator, localhost is *not* your PC. Do not
use the string "localhost" for any development work.

--
Chris Tacke, eMVP
Advisory Board Member
www.OpenNETCF.org
---
Windows CE Product Manager
Applied Data Systems
www.applieddata.net

First of all, emulator and laptop must be configured on the same
network. If your laptops IP is 169.254.25.129, then you must configure
the DC21X4 Ethernet Driver to an address like 169.254.25.[1-255] eg 125.

Then if your laptop's ethernet card is connected to a network disable
loopback. Try from pocket explorer to get a page on your laptop's IIS
like this //169.254.25.129/mypage.htm .It must work.

If the ethernet is disconnected you need to install and enable loopback.
Configure loopback's TCP in a similar address like 169.254.25.121.

Remember using Lan Card AND loopback together may cause problems to your
access to the network when connected.

Finally the issue about being able to ping using the computer name and
not using the ip adress is something that puzzles me too.(YES, it
happens with the pocket emulator too). I have posted a question to this
forum and expecting some reply.


.
 
C

Christos Chorattides

Can you connect to your PC shared drives (or directories) through your
emulators Pocket File Explorer?

Connection Settings error is misleading. Actually those settings are for
dial-up connections and I can't see why you have different behaviour
when you change that. The fact is that when your LAN connection fails,
Explorer tries to connect with a dial-up connection and of course fails.

Just to make sure, have you tried a configuration like this:
Laptop (Realtek) IP 169.254.25.129
255.255.255.0

LoopBack IP 169.254.25.130
255.255.255.0

Emulator (DC21X4) IP 169.254.25.131
255.255.255.0

Try from Pocket IE //laptop/<VIRTUALDIR>/page
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top