System.Net.Dns.Resolve & System.Net.Dns.GetHostByAddress bugs

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

Guest

Hi all,

Why this functions throws exception "No such host is known" on string which
contains IP address?

Best regards,
Gennady
 
realy there is uri.Host (type is string), "192.168.1.2" - this is real IP in
my local network this is Axis camera IP, my PC IP address in network is
different of course.
i have tested it only on emulator (Pocket PC 2003), CF without SP, "Paul G.
Tobey

Also I have test it on another web server when i put there "shlang" (this is
a name of PC in my local network which has IP 192.168.1.131) all works, but
when i put string "192.168.1.131" it is throws exception.

P.S. can you help me with question "27 Dec" "Locking web server...." ?
 
Really i didn't test it on installed SP2, and I already try to parse hostName
on case with IP .

It's very very strange why in CF so many bugs (Is this really MS product? :)
).

I willl not test it on SP2 now. I'm not QA manger - i'm developer.

So at the first i develope working code for CF without SP,
than I try to test it on SP1 and SP2 (There were situations, when it throws
new exceptions on SP2, for example without SP readonly file attribute is
ignored, but on SP2 code which try modify these files throws exception).

Really, problem with IP resolving wasn't big for me - just it was very
strange.

But in case when i have use HttpWebRequest & HttpWebResponse (please see
question without answers "Locking web server after 2nd wrong authorization"
which was posted at 27 dec.) it trouble was big for project terms. I lost 2
days because i tried to find out solution and than have develope own http
client routine based on sockets.

I hope that in new year The Mobile World will get a stable CF. I know that
you can do it.

Happy New Year!

Best regards,
Gennady
 
If Dns.Resolve() doesn't handle passing an IP address, I wouldn't call that
a bug. It should be documented, if that is, in fact, the case, but it is
quite a reasonable thing for it to do. The bad part is if that *isn't* how
it works on the desktop.

Yes, I feel your pain with respect to changes in actual functionality from
SP to SP. My hope would be that what works in earlier versions, provided
it's valid, still works in later versions. The exceptions are likely a
response to something that actually is not valid, however. Your read-only
case is a good one; it's actually *better* to throw an exception, in that
case, since that gives the application proper information that it should
have before hauling off and changing a file that the user has marked as
read-only. You're much more likely to give the user what he wants there.
Unfortunately, there doesn't seem to be a reasonable way to mark and EXE for
"SP1 functionality" , rather than SP2 and have some things like that keep
working as before.

I've read your message on the Web stuff and don't have an answer for you
(you can tell that, if I have an answer, it almost always gets posted).

Happy New Year to you, as well!

Paul T.

Gen said:
Really i didn't test it on installed SP2, and I already try to parse
hostName
on case with IP .

It's very very strange why in CF so many bugs (Is this really MS product?
:)
).

I willl not test it on SP2 now. I'm not QA manger - i'm developer.

So at the first i develope working code for CF without SP,
than I try to test it on SP1 and SP2 (There were situations, when it
throws
new exceptions on SP2, for example without SP readonly file attribute is
ignored, but on SP2 code which try modify these files throws exception).

Really, problem with IP resolving wasn't big for me - just it was very
strange.

But in case when i have use HttpWebRequest & HttpWebResponse (please see
question without answers "Locking web server after 2nd wrong
authorization"
which was posted at 27 dec.) it trouble was big for project terms. I lost
2
days because i tried to find out solution and than have develope own http
client routine based on sockets.

I hope that in new year The Mobile World will get a stable CF. I know that
you can do it.

Happy New Year!

Best regards,
Gennady

Paul G. Tobey said:
Make sure that you're using SP2 on the device and try it there. There is
also a thread from a while back concerning this and it may still be true:

http://groups-beta.google.com/group..._doneTitle=Back+to+Search&&d#a64036b464885c57

Paul T.

Gen said:
realy there is uri.Host (type is string), "192.168.1.2" - this is real
IP
in
my local network this is Axis camera IP, my PC IP address in network is
different of course.
i have tested it only on emulator (Pocket PC 2003), CF without SP,
"Paul
G.
Tobey

Also I have test it on another web server when i put there "shlang"
(this
is
a name of PC in my local network which has IP 192.168.1.131) all works,
but
when i put string "192.168.1.131" it is throws exception.

P.S. can you help me with question "27 Dec" "Locking web server...." ?

[eMVP]" wrote:

Can you print exactly what you are passing in that parameter?

Paul T.

Hi all,

Why this functions throws exception "No such host is known" on
string
which
contains IP address?

Best regards,
Gennady
 
Back
Top