473,756 Members | 6,098 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.e xe -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.
".\SQLEXPRE SS" was changed to "YLW4WSDVLP R2"
"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 2516
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 attachDBFilenam e in ConnectionStrin g,
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=YLW4WSDV LPR2;
Integrated Security=True;
AttachDBFilenam e=|DataDirector y|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:
<connectionStri ngs>
<remove name="LocalSqlS erver" />
<add name="LocalSqlS erver"
connectionStrin g="data source=YLW4WSDV LPR2;
Integrated Security=True;
AttachDBFilenam e=|DataDirector y|aspnetdb.mdf"
providerName="S ystem.Data.SqlC lient" />
</connectionStrin gs>

.. . . 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 attachDBFilenam e in ConnectionStrin g,
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
2113
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 admin aspnetdb.mdf on a non-development computer?
5
3059
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 the error I'm getting after I publish my site to their servers... An attempt to attach an auto-named database for file c:\hosting\myhost\member\myaccount\customerdomains\mysite\App_Data\ASPNETDB.MDF failed. A database with the same name exists,...
1
1706
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 databases I need to migrate ASPNETDB to one of our SQL Servers running SQL Server 2000. I have used aspnet_regsql.exe to create the database and added these lines to the web config file in the connectionstrings section.
0
1182
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 written: using (SqlConnection aspnetdb = new SqlConnection(ConfigurationManager.ConnectionStrings.ConnectionString)) { aspnetdb.Open(); // here problem
1
2945
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 SQLExpress. On local it run OK. The problem araise when I upload the precompiled site to a production server. On production server I have SQLserver 2000. I have read that I need to create on server the same db using the command aspnet_regsql.exe. ...
3
6919
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 web.config file got updated with the entries that include the connnectionString. However, when I try to test the connection (i.e. AspNetSqlProvider), I do get:
1
1840
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 failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. What should I do..? I´m lost..!
3
1987
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 there on March 7th the day I was adding some web references. How might this have gotten added to the project? -- Regards, Gary Blakely
3
3534
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 (user.IsInRole("Manager")) // HERE ERROR The error is: Generating user instances in SQL Server is disabled. Use sp_configure 'user
0
9271
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8709
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7242
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6533
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5139
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3804
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3352
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2664
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.