08.01.2015 Views

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

140<br />

CHAPTER 6 ■ DEPLOYING YOUR WEB SITE<br />

Configuring Your Data Connections<br />

Remember, your web service is connected to your database, so the first step is to change<br />

the web service connection from pointing to your local database to pointing to the<br />

server-based one. You do this by changing the connection string.<br />

Earlier, you had a connection string that looked like this:<br />

Data Source=localhost\SQLExpress;Initial Catalog=AdventureWorks;<br />

Integrated Security=True<br />

You should change it to look like this:<br />

Data Source=servername\SQLExpress;Initial Catalog=AdventureWorks;<br />

Integrated Security=True<br />

You may face some issues when trying to connect to this remote database. The most<br />

common ones will be that SQL Server isn’t configured for remote access <strong>and</strong> that the<br />

server firewall isn’t permitting the SQL Server traffic to pass.<br />

You’ll see how to resolve these issues in the next sections.<br />

Configuring SQL Server for Remote TCP/IP Access<br />

SQL Server is configured using SQL Server Configuration Manager. From here, you can<br />

control the services, the native client, <strong>and</strong> the network configuration.<br />

On the network configuration screen (see Figure 6-12), you should make sure that<br />

the TCP service is enabled <strong>and</strong> running.<br />

Figure 6-12. SQL Server Configuration Manager

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!