p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

aspdotnet_website_programming thread: How to get thePhile running under .NET Framework 1.1 beta & MSDE


Message #1 by "John Hwang" <jhwang@c...> on Mon, 20 Jan 2003 22:19:42 -0500
I just picked up this book and I can't tell you how enlightening this
book has been for me.  Great Job on the book~

One criticism would be that the source code doesn't give an easy way to
setup the thePhile site for people who can't afford MSSQL Server 7.

*** I don't know why the authors didn't distribute a MSDE version
instead of the costly MSSQL7 version ***

I currently have the beta version of .NET framework 1.1 and MSDE
installed on my machine.  I just successfully installed the thePhile
site after a few hours of researching on the internet...

Here's how to get the thePhile site up and running with MSDE...

Make sure you have the following installed on your machine...

- .NET Framework
- Visual Studio.NET
- MSDE
- Access 2000 or XP

After installing all of the above you have to change 1 setting in the
registry.  (**Make sure to make a backup of the registry before you
start**)

Step 1) Run "regedit" to bring up the registry editor
Step 2) Goto:

"HKEY_LOCAL_MACHINE : SOFTWARE : Microsoft : MSSQLServer : MSSQLServer"

Step 3) Double click on the entry that says "LoginMode" and set the
value to "0"

Note: 

"0" (zero) = logon using Mixed Mode Authentication (required)
"1" (one) = logon using Integrated or NT authentication only
"2" (two) = logon using SQL Authentication only

Step 4) Restart the MSDE SQL Server

Step 5) Open the Visual Studio.NET command prompt

Step 6) Login to osql:

osql -Usa -P -S <server_name>

Hit enter and you should get:

1> 

Good~ Now we know that you can login as sa.  At this point I strongly
recommend assigning a password to sa but then you have to add the
password to all the Config files... So I didn't add the password in the
instructions...

Step 7) Create the thePhile database

1> create database thePhile
2> go

Step 8) Restart the SQL Server

Step 7) Setup the thePhile site according to the install instruction
found in the "Sample_code.zip" that you downloaded from wrox.  Change
the necessary config files to get error handling working.

You should have a virtual directory pointing to c:\wrox\thePhile

Step 8) We will not create the thePhile database, but the problem is
that MSDE can't properly restore the database-backup properly.  When you
try to restore the database using osql it can't find the original
directories and bombs out... so we have to create the MSSQL default
directory ourselves... 

in the DOS prompt:

mkdir c:\MSSQL7 <enter>
cd MSSQL7 <enter>
mkdir data <enter>

you should now have c:\MSSQL7\data in your C: drive

Step 9) Open Access to install the DB 

I don't know why but you have to use access to restore the DB... osql
doesn't want to restore the files...

Step 10) Open a new project (not a database)

Step 11) Connect the project to the SQL server by going under "File"
then "Connection"

Step 12) Fill out the Server Name (your computer name)

Step 13) Select either "Use Windows NT Integrated security" or "Use a
specific user name and password" 

If you select to enter a specific username and password, enter sa and
then select "blank password"

Step 14) Select the thePhile database then click on Test Connection to
check your authorization is set.

Step 15) Click OK

Step 16) Select the "Tools" Menu -> "Database Utilities" -> "Restore SQL
Database"

Step 17) Click "yes"

Step 18) Select the database-backup file found in the "sample_code.zip"
file then click "OK"  You should probably add a .dat to the file...

Now you should be able to view the tables and queries...etc in Access

***that's it***

You need to rebuild the thePhile solution before you can access the
site...
If you have .NET framework 1.1 beta installed you will see some warnings
when you rebuild the site... some of the xml code has apparently become
deprecated.

Point your browser to http://localhost/thePhile/ and the site should
work...
Of course you have to change the necessary settings as explained in the
install page.

MSDE is nice because it's practically like MSSQL 2000 without the GUI
management tools and it has a 2 gig boundary limit but for portals and
web sites this should not be a problem.  You can now install thePhile on
ISPs or  test and hack the thePhile site on your workstation~ Woot!!!

There are probably some errors in the instructions... I'm pretty sure
the instructions are correct.  

Let me know if you have any questions

Thanks,

John Hwang


  Return to Index