hi..would like to know why my application works fine (sometimes) when retriving information from sql server and then sometimes it prompts an error that says the following

An unhandled exception of type 'System.Net.WebException' occurred in System.Web.Services.dll

Additional information: Unable to connect to the remote server

what can i do to prevent this..? sometimes my application works fine after i compile it for about 4 or 5 times without changing any of my codes.