p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

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


Message #1 by "stephen" <smo2@b...> on Wed, 5 Mar 2003 14:32:37
Hi John,

I'm having some probs after selecting the db to restore. This msg comes 
up (please goto link):
http://pertinax.cms.shu.ac.uk/projects_mmtec/project4/error.jpg

and no tables or anything were loaded. Please can you help.

Thanks
Stephen


> 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

Message #2 by "John Hwang" <jhwang@c...> on Thu, 6 Mar 2003 01:13:05
Ryan,

Oh my... it's been a while since this messages was posted... Sorry I 
missed this one...

Ryan, do you see the '3D' in the email messages?  I'm not sure what they 
are... I'm assuming it's p2p.wrox.com re-encoding the email message.  
Unless you say otherwise, I'm assuming they were spaces...

I believe you have to be careful with spaces especially in the web.config 
file due to XML formatting...

I'm suspecting it a formatting issue in your web.config file...

Sorry I can't be of much help... If you can't find any formatting errors, 
email me a copy of your web.config (obviously without the password, etc...)

Maybe you've already found a solution...

Good luck,

John Hwang

> I updated the sa password & made the changes in the web.config file. I
verified that I can log into ThePhile database with osql using the new
password, as well as using Enterprise Manager, and the WebData Admin 
tool
from Microsoft.  From the event viewer, I get this:
Event Type:	Warning
Event Source:	W3SVC
Computer:	RD
Description:
The server was unable to logon the Windows NT account 'RD\ASPNET' due to 
the
following error: Logon failure: unknown user name or bad password.  The 
data
is the error code.

What settings might I need to change in IIS? The current web.config
connectionString looks like this:
stateConnectionString=3D"tcpip=3D127.0.0.1:42424"
sqlConnectionString=3D"server=3DRD;database=3DThePhile;uid=3Dsa;pwd=3D***
***;"

Ideas?

Thanks for all the help,
Ryan
Message #3 by "John Hwang" <jhwang@c...> on Thu, 6 Mar 2003 01:18:49
Stephen,

Did you follow every step up to the restoring part?

I'm assuming...

1) you've changed your registry...
2) you've created a database called thePhile
3) you've checked the permissions for "sa"
4) you've created a blank project in access
5) you've successfully made a connection to the MSDE/MSSQL7 server

Let me know exactly what steps you've completed successfully and where you 
got stuck at.

The error message doesn't look familiar... (but it may to others...)

John Hwang
Message #4 by "stephen" <smo2@b...> on Thu, 6 Mar 2003 11:58:24
Followed all the steps that you advised but no joy. Everything was fine 
from logging in SQL Server, creating the database, creating a blank 
project and checking the connection. It's when I clicked on restore, 
chose the backup db (changed it to a DAT file) and it seems like it was 
doing some processing work then came up with that msg...

Is it possible for you to generate a SQL script instead?

Cheers
Stephen
Message #5 by "KelleyWeb" <webologist@m...> on Thu, 6 Mar 2003 08:19:51 -0500
I didn't have to rename the database file. I would put that back to it's
orginal name.
I created the database in SQl Server(just the name) and then in enterprise
manager restored the database to the name I just created.
I'm getting in late on this conversation, so please forgive me for not
knowing all the details.
<><
Tim




-----Original Message-----
From: stephen [mailto:smo2@b...]
Sent: Thursday, March 06, 2003 11:58 AM
To: Website Programming with ASP.NET
Subject: [aspdotnet_website_programming] Re: How to get thePhile running
under .NET Framework 1.1 beta & MSDE


Followed all the steps that you advised but no joy. Everything was fine
from logging in SQL Server, creating the database, creating a blank
project and checking the connection. It's when I clicked on restore,
chose the backup db (changed it to a DAT file) and it seems like it was
doing some processing work then came up with that msg...

Is it possible for you to generate a SQL script instead?

Cheers
Stephen
---
Professional Design Patterns in VB.NET:
Building Adaptable Applications

Want to know how design patterns bring reusable
design and adaptabilty to your applications? How
to recognize the need for a design pattern
solution? How to select, design, and implement
the right patterns? How parts of the .NET Framework
(like the .NET Data Providers and .NET Remoting)
take advantage of design patterns? This book
presents a practical approach to using design
patterns in VB.NET, by focusing on the relevance
of design patterns in the different tiers of a
distributed n-tier architecture.

http://www.wrox.com/books/1861006985.htm


Message #6 by "stephen" <smo2@b...> on Thu, 6 Mar 2003 17:32:21
When I revert the file back to the original, Access does not recognise it 
and only looks for a DAT file. Dont think changing the file is the 
problem as it worked for you John, didn't it?

Cheers
Stephen 
Message #7 by "Penn White" <pennwhite@h...> on Thu, 6 Mar 2003 18:52:39 -0500
I'm afraid I'm having some similar problems.  Like Stephen, I got to the
part where I was supposed to restore the db and got the error message posted
here:

http://www.alltel.net/~ecritt/errormsg.html

Doesn't look much like Stephen's message.  Don't have any idea who 'davidb'
is.

TIA.

Penn

  Return to Index