v-lwang
9/8/2003 9:22:00 AM
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" <dmhart@gte.net>
| 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: <#P1TgxDdDHA.1880@TK2MSFTNGP10.phx.gbl>
| 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
|
|
|