Data source for connection string in Web.config

asp.netconnection-stringweb.config

I was wondering what should be the data source for the connection string in Web.config

My SQL Database explorer looks like 198.57.59.70(SQL Server 10.50.1600 – RAM\ServerAdmin) under which i have databases. When i use this, i get as Network to the database does not exists. When i use Data Source=198.57.59.70, i get an error "System.Data.SqlClient.SqlException: Login failed for user 'RAM\IWPD_3"
This is in asp.net 3.5 in Windows server 2008 for deployment. Thank you!

Can some one guide me, Thank you!!

<connectionStrings>
    <add name="ConnectionString" connectionString="Data Source=198.57.59.70(SQL Server 10.50.1600 - COMM\ServerAdmin);Initial Catalog=Tracking;Integrated Security=SSPI;" providerName="System.Data.SqlClient"/>
</connectionStrings>

Best Answer

For me Connection strings could be hard to remember. Its very easy to make a mistake when you write it manually. One advice is to use the server explorer to connect to your database. Then right click on your database icon > select properties ... you will see the connection string copy and paste . VoilĂ !

If you still have problem then remove the integrated security setting

Server Explorer:

enter image description here

Properties:

enter image description here

Related Topic