I'm using WinXP Pro, SQL Server 2005 Express, IIS 5.1 & VS 2005
Thanks to danjpohl for leading me to this solution on the post "Wrox with VS Pro and SQL Server 2005 Standard" at http://p2p.wrox.com/topic.asp?TOPIC_ID=37465
. I had spent several hours trying to get the WroxUnited example to work when I first bought this book several months ago and had to give it up for higher priorities. I came back to it this week and saw in the forums others were having similar issues. Now that I found the answer that worked for me I wanted to put it out here in case someone else is having the same problem.
I am using sql server 2005 express edition but I already had it installed for other work that I do and did not accept the default installation which names the local instance YourComputerName\SQLServerExpress or something to that effect. In order to be compatible with other development that I do, I set up my install to use only the local name.
So instead of:
my local SQL server is
which is handy if you, like me, develop on several different machines or collaborate with others, because all of your connection strings in Crystal Report Writer can use
. <a period>
in lieu of the various machine names and various versions of MS SQL.
The big gotcha with getting the WroxUnited example to work was that the data source lines in the connection strings for LocalSqlServer and WroxUnited on the General tab in the Edit Configuration button on the ASP.NET tab of the WroxUnited virtual domain assume that you are using the .\SQLServerExpress configuration. (How's that for a run on sentence?) So the solution for me was to delete \SQLServerExpress from the connection string in both places. So here are the steps that I followed to get mine working. They are copied almost exactly from danjpohl's post mentioned above.
1 - Created "c:\websites\WroxUnited"
2 - Extracted the files from FinalApp.Zip into a temp folder and then copied the contents of the WroxUnited folder to "c:\websites\WroxUnited\"
3 - Add "Network Service" access to "c:\websites\WroxUnited\app_data"
4 - Opened up Control Panel\administrative Tools\Internet Information Services
5 - Expand your local computer \ websites - Right Click on Default Web Site and add New Virtual Directory
6 - Enter "WroxUnited" for Alias
7- set directory to "c:\websites\WroxUnited"
8 - Kept defaults for directory permission
9 - After the Virtual Directory is created expand Default Web Site, right click on WroxUnited and select properties
10 - On the Virtual Directory tab under Application Settings click the Create button to cause the application name to be WroxUnited
11- On the Documents tab add default.aspx to top of Default Documents list if it is not there.
12 - On the Directory Security tab click the Edit Button
13 - Verify Anonymous access, Allow IIS to control password, and Integrated Windows authentication are all checked and nothing else is.
14 - Select the ASP.NET tab
15 - Make sure ASP.NET version is 2.0.50727 â
16 - Then hit the apply button
17 - Select Edit Configuration
18 - On the General tab highlight LocalSqlServer and hit edit
* 19 - Delete \SQLSERVEREXPRESS leaving only the period. So the new line is:
data source=.;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspn etdb.mdf;User Instance=true
20 - Save that line
* 21 - Highlight the WroxUnited line and repeat steps 16 - 18. That new line is:
Data Source=.;AttachDbFilename=|DataDirectory|WroxUnite d.mdf;Integrated Security=True;User Instance=True
22 - Hit ok a couple of times to get out
23 - Try http://localhost/WroxUnited/
and do happy dance!
* If you chose a different name than SQLServerExpress for your SQL Server instance instead of removing it as I did, replace the \SQLServerExpress with \YourChosenName instead of deleting it. I didn't have to tell you to replace the "YourChosenName" with the name that you actually chose, or you wouldn't have made it this far.<g>
After that everything seems to work. I hope this helps some one else.
P.S. I really appreciate the authors checking in on these forums Cause I know I'll be back as I work through the rest of the book.