Hi,
When changing anything in the user.config, your changes are not read by the website until it is reloaded (in IIS). To force your website to reload, you can add an empty line to the bottom of the web.config file. If you are doing that, but still having an issue getting the site to connect to your server, see below.
Ensure the following on your SQL Server:
- Allows Remote Connections
- From within Management Studio, right click the server in the "Object Explorer" and select "Properties."
- Select the "Connections" page.
- Check the "Allow remote connections to this server" box.
- Click the "OK" button.
- TCP/IP is enabled
- From within SQL Server Configuration Manager, expand "SQL Server Network Configuration."
- Click "Protocols for [INSTANCE NAME]."
- Double-Click "TCP/IP" in the list on the right.
- Set "Enabled" to "Yes."
- Click the "IP Addresses" tab.
- Expand "IP ALL" and make sure "TCP Port" is set to 1433.
- Firewall allows access to SQL Server on port 1433.
If prompted to restart SQL, do so.
You can not use Windows User unless your website application pool has it's identity set to a windows account that has access to the database. If you don't know if your application pool is configured this way, it probably isn't and you should use a SQL user. If you are using a windows account, configured with access to the database, you do not enter that username and password in the connection string. You enter Trusted_Connection=Yes in place of the username and password attributes.
Some sample connection strings can be found in the Using MS SQL documentation.
HTH,
Joe D.