Openning WAT does NOT reate aspnetdb.mbf

G

Guest

Problem summary:
Web Site Admin Tool is not generating the application services database
(aspnetdb.mdf); i.e. The DB is not found under the app_data directory.

The Question:
What configuration am I missing to allow WAT to create the application
services database?

Scenarios I tried:
On a dedicated developer workstation running WXP w/ SP2, I installed
- SQL Server '05 (without SQLEXPRESS)
- vStudio '05

-- SS 2005 is running and has no problems
-- IIS is running and has no problems

Logged in as a member of the Administrators group, within vStudio 2005,
I try to run the Web Site Admin Tool (WAT), the site opens. Next when I
click on the SECURITY tab, I get the following error:
"Unable to connect to SQL Server database"

Clicking the [Choose Data Source] button takes me to the PROVIDER tab, and
when I click on either of the two choices, I get the same error message:
"Could not establish a connection to the database, exit the Web Site
Administration tool, use the aspnet_regsql command-line utility to create and
configure the database, and then return to this tool to set the provider."

1) Running the aspnet_regsql tool as a wizard and specifying:
- YLW4WSDVLPR2 -- the localserver name
- aspnetdb for the database name
the utility completes successfully.

Trying again to use the Web Site Admin Tool, the database is not to be found
under the app_data diretory and the same error senario unforlds.

2) Running the aspnet_regsql tool from the command line as:
aspnet_regsql.exe -E -S localhost -A all
comletes successfully, but the DB is not to be found.

Additional config info:
The machine.config connection string was changed to refer to the correct SS
'05
e.g.
".\SQLEXPRESS" was changed to "YLW4WSDVLPR2"
"User Instance=True" is removed

The vStudio application's web.config connection string is empty.

Any suggestions???? will be appreciated.
 
E

ElronVel

Hello,

The tool aspnet_regsql can be used to install application services db.

It should have created the db for you. Verify by inspecting the
Sql Server if it exists (in your case, aspnetdb)..

If you removed user instances and attachDBFilename in ConnectionString,
then you
should be using the SQL Server 2005 itself and no files will be
created in the App_data directory.

To use SQL2k or SQL2005, Here is an excellent blog by Scott

http://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx

To go in depth , this links maybe useful.

http://msdn2.microsoft.com/ms254504.aspx

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsse/html/sqlexpuserinst.asp

HTH,

Elrey Velicaria
 
G

Guest

Thanks for your reply. scottbu blog was good to a point, but no cigar so far.
And the reason for it, the discussion failed to point out the following:

- how to configure the ASP.NET 2.0 to have separate aspnetdb databases for
each application generated automatically under each app_data folder in
vStudio 2005 when the Web Site Admin tool is opened (as is the default action
when SQLEXPRESS is installed).

- how one can configure the environment ONCE -- such that the local
application root web.config will have the correct connection string without
having to type it in, or edit it, each time one creates a new ASP.NET
application.

As a matter of fact, for the connection string name "LocalSQLServer", the
IIS ASP.NET tab on my machine already shows the follwing connectio string
parameters:
data source=YLW4WSDVLPR2;
Integrated Security=True;
AttachDBFilename=|DataDirectory|aspnetdb.mdf

On the other hand, vStudio created a web.config file under the application
root, but it had no connection string at all. Manually, I added the following
connection string:
<connectionStrings>
<remove name="LocalSqlServer" />
<add name="LocalSqlServer"
connectionString="data source=YLW4WSDVLPR2;
Integrated Security=True;
AttachDBFilename=|DataDirectory|aspnetdb.mdf"
providerName="System.Data.SqlClient" />
</connectionStrings>

.. . . but that resulted in the same error scenarios descrobed in my initial
posting.

So the major questions remain as before,

1) how to configure the environment such that the application services
database will be created under app_data folder in vStudio whenever the Web
Site Admin tool opens up as is the default when SQLEXPRESS is installed and
used.

2) how to configure the environment such that the application root
web.config will automatically be created with the correct connection string
for the situation described in (1) -- the app serviced database (aspnetdb) is
installed for each application separately under their own app_data folder.

Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top