I am only through the first four chapters but I felt it was important to get this information out to people who have bought the book or are about to buy the book.
This is a very good book but some of the sample apps are missing key points in preparing to use those apps. First off, I am using XP Pro, SQL Server 2000 and Visual Studio 6 on a Pentium IV 1.8GHz machine with 512MB of SDRAM (Dell Dimension 8200). Now for the problems:
(1) On page 78 Craig explains the two ways one can connect to SQL Server quite well but a little more help could've been given about what you have to do if you are using NT authentication. He says, "you must go into SQL Server and give permissions for that specific database to a user on your system called IUSR_<servername>...". For us novices out there a few words on how to do that would've been helpful. I fumbled around with it but figured it out (open SQL Server Enterprise Manager, navigate to your SQL Server, expand it, expand the SECURITY folder, right click on LOGINS and select NEW LOGIN (take it from there)).
(2) And if you do use NT authentication you need to modify the provider string that he shows on page 79. You will not need to use a User ID or password (just like he says) but you will need this at the front of the string, "Trusted_Connection=yes;" My connection string looks like this:
"Trusted_Connection=yes;Provider=SQLOLEDB;User ID=;Initial Catalog=Northwind;Data Source=Jupiter;PASSWORD=;"
'Jupiter' is my computer's (server's) name and 'Northwind' of course is the name of the dB in SQL Server.
(3) I had HUGE problems with the app he calls 'RealApp' beginning on page 105. Here's what I did to get it to work:
(a) If you have Norton Anti Virus (NAV) turn off SCRIPT BLOCKING. You do this by going to the OPTIONS menu in NAV.
(b) The folder that you write the text file to on your server must have READ/WRITE permissions for the IUSR_<servername> user name (if you're using NT authentication). That means you have to go to the SECURITY tab of the folder's properties; however, if you are using XP Pro you won't see a SECURITY tab anywhere! To expose the SECURITY tab, go to CONTROL PANEL, select APPEARANCE AND THEMES, and then click FOLDER OPTIONS, then on the VIEW tab, under ADVANCED SETTINGS, clear the "Use simple file sharing [Recommended]" checkbox. Now you will be able to see the SECURITY tab on all of your folders.
(c) Tell IIS that this app is a Web app (if you don't then Global.asa will never get looked at). Navigate to the RealApp web page icon in IIS. Right click it. Choose PROPERTIES. In the DIRECTORY tab look for APPLICATION NAME (it will be grayed-out) then click the CREATE button next to it. While you are here go down to the APPLICATION PROTECTION line and set it to "LOW (IIS Process)".
...