Did you just get the game and install it? If you've had it for a while and you've installed it before, did you have the same problem that you're having now?
This error message usually indicates that there is a conflict between a piece of software and/or hardware in your system and the copy-protection scheme that Diablo II uses (Securom). Most of the steps on the Blizzard support site for this error message are for those who cannot play the game at all after installing it, which usually indicates a hardware conflict (usually with the person's optical drive and/or their motherboard chipset). You are able to play as long as you don't restart your computer, which probably indicates a weird software conflict; I am reflecting on what I've seen before when it comes to this problem.
You've probably seen this page before, but you need to make sure that you've done the steps on it:
http://www.blizzard.com/support/?id=adt0287p5
That page lists some possible software conflicts. As a matter of fact, a while back there was a Blizzard Support News item about how Blizzard has received reports that having Kazaa or Kazaa Lite installed causes the exact same problem you're having. If you have Kazaa or Kazaa Lite installed, please uninstall it, reinstall the game and then see if that solves the problem.
That error message also has another cause, which is a virus corrupting your game executable. I believe that in 90% of the cases of this error message that I've seen, a virus was to blame. In order for the Securom copy protection software to work properly, your game executable must remain untouched. There are viruses that if they infect it, they will modify your game executable in such a way that Securom won't work, and this virus is one of them:
http://securityresponse.symantec.com/avcenter/venc/data/w32.pinfi.html
I believe that the Pinfi virus is usually contracted by downloading executable files off of peer-to-peer file-sharing programs such as Kazaa, and if you have Kazaa installed and you've downloaded some executables (maybe hacks and cracks for certain programs), maybe you have found the cause of your problem. Please scan your system for viruses with an up-to-date antivirus program; try scanning with more than one scanner to get some "second opinions" (maybe the first scanner won't catch the virus). If you find a virus that modifies random executables such as the Pinfi virus, remove it and then reinstall Diablo II.