0

I have a hosted Windows Server 2008 virtual machine. It is for my Internet sites. I installed IIS services on my Windows Server 2008. It is normal work. I installed SQL Server 2008 R2 on my Windows Server 2008. It's for site database. My site is written in ASP. IP address of my Windows Server 2008 is 81.177.159.120. Name of my SQL Server database is TVERREMONT. I created an account on SQL Server with login: MyUser and password: MyPwd. The connection string in my web.config is:

<connectionStrings>
    <remove name="LocalSqlServer" />    
    <add name="LocalSqlServer" connectionString="Data Source=81.177.159.120;Initial Catalog=TVERREMONT;User ID=MyUser;Password=MyPwd;" providerName="System.Data.SqlClient" />
</connectionStrings>

I can't connect my site with sql server database. The following error is shown in the browser:

Error HTTP 500.19 - Internal Server Error

How I can to connect sql server database with my site? Is there a SQL Service that I have not started maybe? Maybe something more?

squillman
  • 37,883
  • 12
  • 92
  • 146
  • The only thing I see that may be an issue, is the lack of an instance name if you aren't using a default instance install. – DanBig Jun 26 '12 at 13:11

1 Answers1

0

Your connection string is fine. Make sure that SQL Server is allowing remote connections. Take a look at this post. Also make sure you've added the login as a user of your database with appropriate permissions. It's not enough to just create the login at the server level.

squillman
  • 37,883
  • 12
  • 92
  • 146
  • I adjusted my remote connection settings. It’s okay. I checked my SQL Server account settings. I can take authentication to SQL Server with my login and password and my database will be accessible for data read and data write. When I created SQL Server account on left veritcal menu I choised section "server roles" and then in right area mark all of checkboxes. When I choised section "collation of users" then I choised in right top area checkbox with my database name "TVERREMONT". Then I checked all of checkboxes from ridght lower area under that. Site is inaccessible. What can I do with this? – user126017 Jun 27 '12 at 10:52
  • At this point I would suggest looking in the Windows application event log or turning remote errors on for your web site so you can see the detailed exception. Do that and let us know what the exception is. – squillman Jun 27 '12 at 11:51