Re: Retrieving Date & Time from a web server (localhost)



On Apr 14, 12:52 pm, teo <t...@xxxxxxxxx> wrote:
I'm developing a software (a WinApp, not a WebApp)
to retrieve Date & Time from a web server,
but firstly I need to to test it on my PC, with "localhost"

I'm using the VB Net language
(below two different code approaches),
I'm with XP Sp2 and IIS
(all IIS http and ftp tasks regularly work)

I have no firewall
I think it maybe a matter of Service enabling
(maybe involving the port 13...)

Any attempt fail.

1  approach)
using the following VB Net API

Private Declare Unicode Function NetRemoteTOD Lib "netapi32" ( _
  <MarshalAs(UnmanagedType.LPWStr)> ByVal ServerName As String, _
  ByRef BufferPtr As IntPtr) As Integer

the entire example here:http://www.codeproject.com/KB/vb/NetRemoteTOD.aspx?fid=31067&df=90&mp...

tried using

"localhost"  
"http//localhost"  
"127.0.0.1"

but always got  00.00.00.00

2 approach)
using this VB Net command

Dns.GetHostByName("localhost")

it seems to work because no error occurs
(if I wrote "localhostSharonStone" an error occurs),

but the very next command it does fail:
objTcpClient.Connect("localhost", 13)

it says (translated into English)
"Impossible to establish a connection. The addressed computer
keeps on refusing".

Any hint?

sorry, but what exactly isnt working?
u running a webservice in your ide, and it fails?
.



Relevant Pages

  • Retrieving Date & Time from a web server (localhost)
    ... to retrieve Date & Time from a web server, ... (all IIS http and ftp tasks regularly work) ... Any attempt fail. ... using this VB Net command ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Retrieving Date & Time from a web server (localhost)
    ... to retrieve Date & Time from a web server, ... but firstly I need to to test it on my PC, with "localhost" ... Any attempt fail. ... but if I locally tested it, writing "localhost", ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: IIS & Windows Authentication
    ... > automatically presented you current user credentials, ... > LocalHost will fail if the site is bound to a specific IP#. ... > the site is bound to 192.168.4.85 and you use LocalHost, ... > Directory FQDN and that FQDN is not properly set in ISA's Internal Network ...
    (microsoft.public.isa)
  • Re: Cups problem
    ... I still cannot open "localhost 631" 'Unable to connect'. ... # that require network functionality will fail. ... not accepting anything i put to it.can I delete a cups password file ... and root password ...
    (Fedora)
  • Re: Kill Search Behaviour
    ... if the DNS and HOSTS lookups fail IE starts doing ... I thought that if you use a protocol prefix that the URL ... instead of using localhost try using 127.0.0.1 explicitly. ... to make the lookup for the search site fail. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)