When a control runs under an excluded path, it will run under an
Application Pool, if you didn't change the application pool for
Sharepoint it will run underr the NETWORK Service account. In order to
fix your problem you need to either
- Change the application pool for the virtual directory
- Check the Identity of the pool configured for your virtual directory
and make sure this user has been granted access to the SQL database.
I will recommend using a Windows/AD Account and grant this user access
to SQL and the database