-2

I have an internal website that is on computer A and it connects to computer B through a connection string. The website can load the data from the database and view it, but when I try to edit that data, I get the above message.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

I set this same website up at another site with the same install of SQL Server and apparently the same settings on computer A and computer B, however at the new site, I cannot update via the website. I've checked all settings I know of through the Management Studio.

The login was made a member of the db_datareader and db_datawriter on the database. Password was verified as okay.

What would make this connection not allow update, when all settings appear to be properly set?

jroyce
  • 2,029
  • 2
  • 22
  • 45
  • is your application using integrated auth or are you placing the user credentials directly in the config? This initially sounds like your app is using integrated auth but your application pool user in IIS is not set to the specific user with permissions. – Travis Acton Oct 16 '17 at 21:02
  • Credentials are placed directly in the configuration. – jroyce Oct 16 '17 at 21:03
  • using the same login and password, can you edit data via Sql Server Management Studio? – mxmissile Oct 16 '17 at 21:05
  • Trying that now – jroyce Oct 16 '17 at 21:10
  • wait, so are you bringing up a new instance of sql server for each website? or for each machine? Can you expand your setup a bit more, re-reading your problem description and I am a bit confused, – Travis Acton Oct 16 '17 at 21:11
  • Yes I can update using the login when directly updating they management studio. – jroyce Oct 16 '17 at 21:12
  • I have a web app with a connection string that names the server IP address (verified as correct), a login name, a password and a database name. This connection occurs at each read or write. On the read, connection works fine and no error. On the write, I get the above error. – jroyce Oct 16 '17 at 21:15
  • Possible duplicate of [Why am I getting "Cannot Connect to Server - A network-related or instance-specific error"?](https://stackoverflow.com/questions/18060667/why-am-i-getting-cannot-connect-to-server-a-network-related-or-instance-speci) – Erik Philips Oct 16 '17 at 21:16

1 Answers1

0

After reviewing everything I found there was another connection string which had a wrong IP to the server. Everything worked after that.

jroyce
  • 2,029
  • 2
  • 22
  • 45