When you run your application in VS 2008, it will run under your nt login credentials.
But when you deploy your application in IIS 5.x in Windows XP, it will run under aspnet account and Network Service account in Windows 2003.
Therefore the above accounts may not have access to the folder where your file exists. Just checkt that.