Webservice can not be accessed

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everyone,

I have written an app which connects to a web service. I try to debug it in
the emulator for Pocket PC 2003 SE in Visual Studio 2005. In order to setup
the connection between the host pc and the emulator I follow the instructions
on this web page: http://blogs.msdn.com/akhune/archive/2005/11/16/493329.aspx
After doing that I can access web sites in the Internet Explorer of my
Emulator (e.g. www.microsoft.com) but I can not access sites in my intranet
(e.g. http:\\Computer1\ServiceName\Service.asmx). The only way to get access
to this intranet sites is by switching to the File Explorer and open a shared
folder on my host pc. After logging in I have full access to all my intranet
sites.
I have enabled anonymous access to my IIS directory.
 
Kessel said:
Hi everyone,

I have written an app which connects to a web service. I try to debug it in
the emulator for Pocket PC 2003 SE in Visual Studio 2005. In order to setup
the connection between the host pc and the emulator I follow the instructions
on this web page: http://blogs.msdn.com/akhune/archive/2005/11/16/493329.aspx
After doing that I can access web sites in the Internet Explorer of my
Emulator (e.g. www.microsoft.com) but I can not access sites in my intranet
(e.g. http:\\Computer1\ServiceName\Service.asmx). The only way to get access
to this intranet sites is by switching to the File Explorer and open a shared
folder on my host pc. After logging in I have full access to all my intranet
sites.
I have enabled anonymous access to my IIS directory.
Can you access "http:\\Computer1\ServiceName\Service.asmx" in Pocket
Internet Explorer?

Have you tried substituting the IP of server instead of the host name?
(there may be a DNS resolution issue)

Alternatively, you may wish to leverage a solution like Pocket Hosts to
define that host to your PPC:
http://www.freewareppc.com/utilities/pockethosts.shtml
 
Nino Benvenuti said:
Can you access "http:\\Computer1\ServiceName\Service.asmx" in Pocket
Internet Explorer?
No I can not access this site. Just with having logged in by Files Browser
Have you tried substituting the IP of server instead of the host name?
(there may be a DNS resolution issue)
No because I do not have static IPs
Alternatively, you may wish to leverage a solution like Pocket Hosts to
define that host to your PPC:
http://www.freewareppc.com/utilities/pockethosts.shtml

Thank you, do you think that it is a problem of converting my host name into
an ip address?
 
Firstly, what you could do if you have a dynamic IP address, is to read the
Windows CE registry from: "Software\Microsoft\Windows CE Services\Partners"
to get the ActiveSync host name (name of machine). Then convert this to an
IP address using IPHostEntry class. This is much better regardless if you
have DNS problems as it makes your code less reliance on DNS.

Second, if running a firewall on your server machine running the web
service, ensure port 80 (or whatever port your web server is using is open).
 
There is no value in this key. I used the Windows CE Remote Registry to read
out the value but I just find a NetworkGUID with a value under this registry
path. Is this the value I have to read out (I would expect something like
"ComputerName1"). Sorry, maybe I did not understand your answer completely.

To correct my answer that I am using ActiveSync. I wrote an app for an
symbol scanner. Now I want to write a emulator version of this app, so that I
can debug the app when I do not have a symbol scanner. Now I have to use the
emulator. Normally this app would use wi-fi, but for the emulator version I
have to use DMA, because it is recommended (or is this wrong?).
 
There should be a int value "PCur" which will obtain you the current partner
setting. From that you need to read the key: "Software\Microsoft\Windows CE
Services\Partners\P1" value PName where "P1" is the result from PCur. PName
will by a byte [] unicode encoded, so you will need to convert the byte
array to a string using class UnicodeEncoding.
 
Thanks for your answer.
I did this and i can read out the correct ip, but I do still not get a
connection to the webservice. I guess it is not a dns problem, or am I wrong?


Simon Hart said:
There should be a int value "PCur" which will obtain you the current partner
setting. From that you need to read the key: "Software\Microsoft\Windows CE
Services\Partners\P1" value PName where "P1" is the result from PCur. PName
will by a byte [] unicode encoded, so you will need to convert the byte
array to a string using class UnicodeEncoding.



Kessel said:
There is no value in this key. I used the Windows CE Remote Registry to
read
out the value but I just find a NetworkGUID with a value under this
registry
path. Is this the value I have to read out (I would expect something like
"ComputerName1"). Sorry, maybe I did not understand your answer
completely.

To correct my answer that I am using ActiveSync. I wrote an app for an
symbol scanner. Now I want to write a emulator version of this app, so
that I
can debug the app when I do not have a symbol scanner. Now I have to use
the
emulator. Normally this app would use wi-fi, but for the emulator version
I
have to use DMA, because it is recommended (or is this wrong?).
 
OK, at least you have implemented good practice if nothing else.

It won't be a DNS problem now as you are converted the host to an IP using
IPHostEntry didn't you?

Can you post the WebException that you are getting.


Kessel said:
Thanks for your answer.
I did this and i can read out the correct ip, but I do still not get a
connection to the webservice. I guess it is not a dns problem, or am I
wrong?


Simon Hart said:
There should be a int value "PCur" which will obtain you the current
partner
setting. From that you need to read the key: "Software\Microsoft\Windows
CE
Services\Partners\P1" value PName where "P1" is the result from PCur.
PName
will by a byte [] unicode encoded, so you will need to convert the byte
array to a string using class UnicodeEncoding.



Kessel said:
There is no value in this key. I used the Windows CE Remote Registry to
read
out the value but I just find a NetworkGUID with a value under this
registry
path. Is this the value I have to read out (I would expect something
like
"ComputerName1"). Sorry, maybe I did not understand your answer
completely.

To correct my answer that I am using ActiveSync. I wrote an app for an
symbol scanner. Now I want to write a emulator version of this app, so
that I
can debug the app when I do not have a symbol scanner. Now I have to
use
the
emulator. Normally this app would use wi-fi, but for the emulator
version
I
have to use DMA, because it is recommended (or is this wrong?).

:

Firstly, what you could do if you have a dynamic IP address, is to
read
the
Windows CE registry from: "Software\Microsoft\Windows CE
Services\Partners"
to get the ActiveSync host name (name of machine). Then convert this
to
an
IP address using IPHostEntry class. This is much better regardless if
you
have DNS problems as it makes your code less reliance on DNS.

Second, if running a firewall on your server machine running the web
service, ensure port 80 (or whatever port your web server is using is
open).


I connect via ActiveSync with DMA. I use exactly the same settings as
specified on this web page (
http://blogs.msdn.com/akhune/archive/2005/11/16/493329.aspx).

Thank you,
Pan
 
It won't be a DNS problem now as you are converted the host to an IP using
IPHostEntry didn't you?
->yes I did convert it.


Thats the status of the WebException which I get:
ConnectFailure
Msdn Library explaination: The remote service point could not be contacted
at the transport level
 
Back
Top