Here's a checklist of steps to go through when you have trouble making a database connection from an ASP.NET application
- Can you ping the database server from the ASP.NET server?
- Can you connect to the database using SQL Authentication and Management Studio from the ASP.NET server?
- Write a page with a very simple, small-return query to use as a test. Can you query the database with the test page? Don't rely on any web.config entries, manually enter all connection string and query data (don't leave this test page on the server longer than necessary to test)
- If your test page fails, what is the error? If you test from the ASP.NET server console you should get a detailed error that may indicate the problem.
- If you have multiple server databases, make absolutely sure you're connecting to the server you think you are ;)
General Tips:
Management Studio is probably the single best test- if you can connect through Windows and SQL Authentication via Management Studio from the ASP.NET server, then the problem must be with your ASP.NET application configuration.
You mentioned that you are getting an explicit authentication error that "COMPANY\name" is not authorized. Are you running a domain controller? Is "COMPANY" the domain name? If not, ASP.NET may not be authenticating against the database using your domain account.
If you must use Windows authorization remember to enable impersonation in the web.config:
<identity impersonate="true" />
You will also need to disable Anonymous access and enable Integrated security in the IIS configuration for your site.
HTH.