473,322 Members | 1,398 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Openning WAT does NOT reate aspnetdb.mbf

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.
Feb 8 '06 #1
2 2500
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/archi...25/423703.aspx

To go in depth , this links maybe useful.

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

http://msdn.microsoft.com/library/de...xpuserinst.asp

HTH,

Elrey Velicaria

Feb 8 '06 #2
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.
"ElronVel" wrote:
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/archi...25/423703.aspx

To go in depth , this links maybe useful.

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

http://msdn.microsoft.com/library/de...xpuserinst.asp

HTH,

Elrey Velicaria

Feb 8 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Arne | last post by:
Can I copy aspnetdb.mdf tp another computer and expect the ASPNet account to have rights to open this database? What is the proper way copy ASPNETDB to another webserver? What is the proper wat to...
5
by: VB Programmer | last post by:
My web hoster says that I have to rename my ASPNETDB.MDF SqlExpress db for my 2.0 site to work. Is this accurate? If so, how can I rename it without breaking anything on my site? FYI: This is...
1
by: Derek | last post by:
I am trying to deploy a web site on a server but I am having problems with the ASPNETDB database. It works fine in development on my PC but as SQL Server 2005 Express Edition only supports local...
0
by: RAM | last post by:
Hello, I have written simple ASP.NET application with logging in. I need to open ASPNETDB database to read some information which is not available using class library (custom table). I have...
1
by: 3Dfelix | last post by:
Problems when uploading ASPNETDB.MDF to production server Hi all, I'm a little web with a login page and aspnetdb.mdf file as data base for users. I've done it on local server, with VS2005 and...
3
by: Carlos | last post by:
Hi all, I am trying to figure out how to deal with the membership provider. I used the aspnet_regsql to create the aspnetdb database in my sqlserver2005 instance of my server. I noticed that the...
1
by: CFTK | last post by:
This is the error I get when I try to login in my application from another machine: An attempt to attach an auto-named database for file C:\Documents and Settings\....\App_Data\aspnetdb.mdf...
3
by: GaryDean | last post by:
I noticed that my asp.net project contains a 10 meg ASPNETDB.MDF database in the App_data folder. I never intentionally put it there, have never ran regsql.exe. Reading back on my logs it got...
3
by: R.A.M. | last post by:
Hello, I have created ASP.NET application with aspnetdb database. In the following codeI have an error: System.Security.Principal.IPrincipal user = HttpContext.Current.User; if...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.