aspnetdb.mdf

S

Scott M.

I'm a newbie when it comes to SQL Server and am trying to understand why
there is an aspnetdb.mdf created as a system database in SQL Server 2005
Express edition, but also another one of the same name when I use membership
& roles in an ASP .NET Web Site or WAP.

Actually, I guess I understand why I get one in my App_Data folder of my web
site, but what is the system one for?
 
M

Mark Fitzpatrick

The one in your web site is just created by ASP.Net by default when you
enable membership on it. Unfortunatley, it's mostly useless because there
are very few hosts that have SQL Server Express available in theor hosting
packages, which is required to attach an mdf file defined in a connection
string.

As for how it came into your SQL Server Express edition itself, I'm not
exactly sure. When I tried SQL Server Express a few ties (normally use full
version) it never did this. You may just be blessed though as a db that's
actually attached to SQL Server Express should be easier to get published to
a full SQL Server instance on your host.
 
S

Steven Cheng[MSFT]

Thanks for Mark's input

Hi Scott,

The aspnetdb in your web application App_Data folder is a feature of SQL
Express edition called "user instance" which can help you attach a flexible
mdf file with non-admin privilege.

#User Instances for Non-Administrators
http://msdn2.microsoft.com/en-us/library/ms143684.aspx

As for the aspnetdb in your SQL Express system database, I'm also a bit
surprised as Visual Studio or .NET won't install database into SQL EXPRESS
server instance by default. Is the box also accessible by any other members
on your side? There is a commandline utility in .net 2.0 that can help
create aspnetdb (all the sp and tables for ASP.NET provider services) in a
specified SQL instance:

#Herramienta Registro de SQL Server para ASP.NET (Aspnet_regsql.exe)
http://msdn2.microsoft.com/es-es/library/ms229862.aspx

You may check whether anyone else may have created the database.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



--------------------
 

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,965
Messages
2,570,148
Members
46,710
Latest member
FredricRen

Latest Threads

Top