I have a VB 2005 ASP site running in IIS 6.0 on a 2003 Server. It is back-ended to a SQL Express 2005 database. It was working fine until SQL Express was accidentally uninstalled. I reinstalled SQL Express but could not get the page to open. After a lot of troubleshooting and a previous post on EE I found a setting in IIS Web Service Extensions that allowed or prohibited .NET. I thought all was well, but I found that only pages that didn't require the database would open. Anything that did call SQL produced an error (don't even remember which one right now). After much more research and troubleshooting I uninstalled IIS, the .NET SDK, SQL Express 2005, and the SQL Express Management Studio then reinstalled all exactly (as far as I know) as I did when I initially set it up. I even re-copied the original ASPX and web.config files from my development machine (where it runs fine) back to the server.
As of now, by messing with my web.config file I can get a number of error messages:
<add name="PublicWorksDB" connectionString="Server=localhost\SQLEXPRESS;AttachDbFilename=C:\WEBDOCS\JOBMANAGER\PUBLICWORKSDB.MDF;Integrated Security=SSPI;User Instance=False"
CREATE DATABASE permission denied in database 'master'.
An attempt to attach an auto-named database for file C:\WEBDOCS\JOBMANAGER\PUBLICWORKSDB.MDF failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
If I change User Instance to True I get:
Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.
If I remove User Instance and Integrated Security and instead provide credentials I get:
Login failed for user 'administrator'. The user is not associated with a trusted SQL Server connection.
Even though I can access the Managment Studio with those credentials.
Through all of this I can open any ASPX pages that don't call the database so I know the issue is SQL- but I'm at a loss.