views:

36

answers:

1

hi

I am developing the online bidding system using asp.net where I need to close the auction if the auction time is get closed without any bid.

As in the following web site : http://www.bidrivals.com/us/

Please help me to resolve to this problem.

Waiting for your valuable thoughts.

Thanking You.

+1  A: 

I can think of 4 ways to do this:

1: A bit hackish, but you can try to use the "cache expiration technique" described here:

http://blog.stackoverflow.com/2008/07/easy-background-tasks-in-aspnet/

In short, you rely on the ASP.NET cache expiration mechanism to run some code at a set time. In your case you could set this time to the expiration time of the auction the moment the auction gets created. However, this is unreliable, what if you get a server restart? You can say bye to your cache. But if you use a shared service where you don't have access to the server, this could be your solution.

2: A little better, you can write an .aspx page and call it from the Windows task scheduler every X minutes to run your code. The issue here is that you would have to execute a public page. Could be a security concern.

3: Much better, you can write a Windows Service. But this may be too much work if you lack the time.

4: Have a look at Quartz.NET, this is a .NET port of the industry-standard Java project of the same name. I haven't tried it but it looks promising.

md1337