I am using SQL Server 2008 Enterprise with VSTS 2008, and I am developing a simple web application using ASP.Net and Forms Authentication.
When I am using the configuration tool/menu of VSTS of my ASP.Net project (I want to use this tool to manually add some Forms authentication users), I met with the following error (SqlException),
Trying to attach file D:\Projects\MyTest\App_Data\aspnetdb.mdf to automatically named database failed. It may be caused by existing the same name database, or may be caused by specified file can not be opened or caused by the specified file exists in UNC share.
In my computer, there is no aspnetdb.mdf under dir D:\Projects\MyTest\App_Data, and why this dir will be searched? And I have used aspnet_regsql to generate database successfully before I run the configuration tool. Why there is such error? How to fix it?
thanks in advance,
George
Have you set up your provider with a named connection?
You said that you used aspnet_regsql, which suggests that you are attempting to use the ASP.NET Membership Providers. If you don’t configure the providers and connections in your config, then it will look for a SQL Server Express file called aspnetdb.mdf in the App_Data directory of your site.