Does a user.config file exist in the root of your web folder?
Are you setting the connection string in Web.config or user.config?
If user.config is present, settings there will trump Web.config
If you make a change in user.config it will not be detected by the runtime, so you have to touch web.config to make it load your new settings.
Make sure you are using the connection string in the <appSettings section not the <ConnectionStrings section
If you have DNN working on the same machine can you post the connection string for that but mask the user id and password?
Hope it helps,