You have to set your current integrated security=True
to false
and add user and password. For example:
connectionString="Data Source=123.123.123.123;Initial Catalog=yourDBName;Integrated Security=False;User=yourUsername;Password=yourPassword"
If you leave that setting in True
, user and password are ignored.
If you need more details, here you have the site regarding connection strings, in this case MS SQL Server:
https://www.connectionstrings.com/sql-server/
Now, in order to improve your application, I first suggest you capture this exceptions by using try-catch
blocks, so you can display a friendly message when something unexpected occurs.
Another suggestion is that if you want to keep different connection strings for your local and the installations in other computers, you can keep your current Web.config as is and add a Web.Release.config with the modifications needed. This way, when you build your code in "Release", it will automatically have the "public" connection in its Web.config. More info about how to do this here:
https://stackoverflow.com/a/5811411/2321042