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.

CHAPTER 6 ■ DEPLOYING YOUR WEB SITE 145<br />

Figure 6-17. Adding a user to your database<br />

By this point, you should be able to sign into the database that resides on your database<br />

server from the web service that resides on your web development system by<br />

changing the connection string to use the user you just created:<br />

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

user id=<strong>Web</strong>ServiceUser;password=<strong>Web</strong>ServiceUser<br />

Do note here that storing your password in clear text in <strong>Web</strong>.config like this is a bad<br />

idea <strong>and</strong> a major security risk. In any real environment, you should encrypt the password.<br />

This is beyond the scope of this tutorial, but a great reference for how to h<strong>and</strong>le<br />

encryption of sections of <strong>Web</strong>.config can be found here: http://msdn2.microsoft.com/<br />

en-us/library/dtkwfdky.aspx.

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

Saved successfully!

Ooh no, something went wrong!