I am a new developer and this is my first time to deal with two IIS servers. My company has two servers; Production Server and Testing Server. They are using the testing server for storing /hosting the databases and the Production Server for hosting the applications. All the applications are developed in ASP.NET. Now, for the web-based application that I am developing; I have to put the database in the Testing Server and the application in the Production Server,
so how can I reference the database in the web.config file?
What I have in my web.config file now is the following:
<connectionStrings>
<add name="testConnectionString" connectionString="Data Source=localhost\sqlexpress;Initial Catalog=psspTest;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
I have that because the database resides in the same server with the application. Therefore, how will I be able to reference when I put it in the Testing Server?
Let’s say your testing server is called
testsrvand the database resides on theSQL Server Express instance, you simply change your config to: