I have a VB2005 project I have been working on that uses the built in modem of my laptop to interrogate a piece of equipment. This works fine in debugging mode but if I try to publish it the modem drops off almost immediately.

Would anyone have any idea why this should be happening and how I might fix it?