Date Web Service

D

Derek Hart

Has anybody seen a web service that can check the date. I wish to use this
as a simple shut down for a software product. Instead of checking the
computer's date, which can be changed by the user, I could require an
Internet connection and check the real date with a web service. A simple yet
effective way to shut down a program. Anybody seen this web service?

Derek
 
H

Herfried K. Wagner [MVP]

Hello,

Derek Hart said:
Has anybody seen a web service that can check the date. I wish to use this
as a simple shut down for a software product. Instead of checking the
computer's date, which can be changed by the user, I could require an
Internet connection and check the real date with a web service. A simple yet
effective way to shut down a program. Anybody seen this web service?

Please do not x-post questions like this to the Windows Forms newsgroup.
 
L

Lewis Wang [MSFT]

Hi Derek,

We may use "DateTime.Now.Date" to get the current date on the server and
compare it to closetime of the client. If the webmethod return true, then
we can close the client.

[WebMethod]
public bool close(DateTime closetime)
{
if (closetime<DateTime.Now.Date)
return true;
else return false;
}

Hope this helps.

Best regards,
Lewis

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| From: "Derek Hart" <[email protected]>
| Subject: Date Web Service
| Date: Fri, 5 Sep 2003 23:01:52 -0700
| Lines: 9
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#[email protected]>
| Newsgroups:
microsoft.public.dotnet.framework.aspnet.webservices,microsoft.public.dotnet
.framework.windowsforms
| NNTP-Posting-Host: lsanca1-ar3-4-60-038-124.lsanca1.dsl-verizon.net
4.60.38.124
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:51786
microsoft.public.dotnet.framework.aspnet.webservices:19228
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
|
| Has anybody seen a web service that can check the date. I wish to use this
| as a simple shut down for a software product. Instead of checking the
| computer's date, which can be changed by the user, I could require an
| Internet connection and check the real date with a web service. A simple
yet
| effective way to shut down a program. Anybody seen this web service?
|
| Derek
|
|
|
 

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

Members online

Forum statistics

Threads
473,780
Messages
2,569,609
Members
45,254
Latest member
Top Crypto TwitterChannel

Latest Threads

Top