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.

144<br />

CHAPTER 6 ■ DEPLOYING YOUR WEB SITE<br />

Figure 6-16. Configuring database users<br />

At this point, Object Explorer shows the list of approved database users <strong>and</strong> their<br />

associated login accounts that are configured to have access to the database. Windows<br />

usernames will be prefixed by either the machine name or the domain name. So, users on<br />

the domain MyDomain will appear as MYDOMAIN\username. Similarly, a user from a<br />

machine called DBServer will be prefixed DBServer\username.<br />

To add your new <strong>Web</strong>ServiceUser login to the database, right-click the Users folder <strong>and</strong><br />

select New User. The Database Users – New dialog box will then appear (see Figure 6-17).<br />

In this dialog box, you can (for this database only) change the user’s name by assigning<br />

a different name to the user’s login account. This is known as aliasing. To avoid<br />

confusion, I recommend keeping the database user access name the same as the user’s<br />

SQL Server login name. For example, if you created a SQL Server user called <strong>Web</strong>Service-<br />

User, then you should also use <strong>Web</strong>ServiceUser as the username for accessing the<br />

database in the Database Users – New dialog box (as I’ve shown in Figure 6-17).<br />

You’ll also need to assign the user a role or roles when you authorize them to access a<br />

given database. For security reasons, I recommended you give them the minimum<br />

amount of control that they need to get their job done. In this case, we know the web<br />

service is just reading data, so the db_datareader role is selected.

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

Saved successfully!

Ooh no, something went wrong!