"bruno" wrote:
> Hello Steven,
>
> actually I solved the problem applying one of the two solutions given in the
> document you suggested -->
>
http://aspadvice.com/blogs/plitwin/archive/2005/11/04/13590.aspx. > I changed the web.config, with a remove and add name="LocalSqlServer".
> Now it works, I can access Security tab in ASP.NET Web Site Administration
> Tool. But in the web.config I had to specify: connectionString="Data
> Source=localhost\SqlExpress ... instead of connectionString="Data
> Source=localhost, as reported in the Paul Litwin's Blog (??).
>
> About the two points you would to confirm:
> 1) No changes have been done in machine.config neither in ASP.NET
> application's web.config
> 2) My machine.config contains the connection string exactly as you
> mentioned, but not able to crate any *.mdf file
> 3) SQL Server (SQLEXPRESS) is a running service, the executable file path
> is: "C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Binn\SQLAGENT90.EXE"
> -i SQLEXPRESS
>
> general testing:
> >> i) try creating a normal sql express mdf file in your web application's
> >> "App_Data" folder by "Add New Item---> .....
> I got a message box saying:
> "Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to
> function properly. Please verify the installation of the component or
> download from the url:
http://go.microsoft.com/fwlink/?LinkID=49251. >
> Know I can proceed with my tests and learning, but I would like to be able
> to create also ".mdf" files. So do you think I should re-install SQLExpress
> 2005 or VS2005?
>
> Thank you
> --
> bruno
>
>
> "Steven Cheng[MSFT]" wrote:
>
> > Hello Bruno,
> >
> > From your description, after you installed Visual Studio 2005 and SQL
> > Server 2005 on the machine, when creating a new ASP.NET application and use
> > the web admin tool to configure the ASP.NET application, you're getting the
> > following error, correct?
> >
> > <<<<<<<<<<<<<
> > "Could not establish a connection to the database.
> > ...............
> > >>>>>>>>>>>>>
> >
> >
> > Based on my experience, the problem could be caused by the following things:
> >
> > 1. The admin tool/ASP.NET runtime try connecting to a non-existing database
> > instance(according to the configured provider, membership or role manager
> > ...)
> >
> > 2. The target database instance does exsits, but the current
> > application/'security context can not establish connection to it.
> >
> > For your scenario, I noticed that you've mentioned the following installed
> > instances on your machine:
> >
> > **My_PC_Name\Pinnacle(is this the SQL server 2005 server instance?)
> > **My_PC_Name\SQLEXPRESS(surely this is the SQLEXPRESS instance installed
> > with VS 2005)
> >
> >
> > If the above is the case, I'd like to confirm the following things with you:
> >
> > 1) Have you done any changes in the machine.config or your ASP.NET
> > application's web.config to customize any of the ASP.NET service
> > providers(such as membership, rolemanager ....)? Also, when using the web
> > admin tool, it is on which page and performing which operation did you get
> > the error?
> >
> >
> > 2) by default in the machine.config, it contains the following default
> > connectionstring for all the SQL Server providers:
> >
> > <connectionStrings>
> > <add name="LocalSqlServer" connectionString="data
> > source=.\SQLEXPRESS;Integrated
> > Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User
> > Instance=true" providerName="System.Data.SqlClient" />
> >
> > You can check whether this is the value on your machine. And if you're
> > trying to use the default SQL server provider, it will use this
> > connectionstring to establish connection to the sqlserver instance. (if
> > success, it will create a aspnetdb.mdf file in your application's App_Data
> > sub directory).
> >
> >
> > 3) If you're trying to connect to custom SQL Server database instance
> > instead of the default SQL express one, what custom configuration have
> > performed on the machine? Make sure the SQL Server instance and SQL Express
> > instance has been started.
> >
> >
> >
> > In addition, for general testing, you can try the following things:
> >
> > i) try creating a normal sql express mdf file in your web application's
> > "App_Data" folder by "Add New Item---> SQL Database" menu to see whether
> > you can explicitly create a sqlexpress database file
> >
> > ii) are you developing the web application in VS 2005 through file sytsem
> > project or IIS host project? You can try both mode to see whether it
> > behaves differently.
> >
> > iii) Here is a web article introducing how to use non-default(SQL Express)
> > database for ASP.NET providers, if your problem is related SQL Express, you
> > can use its guide to create custom provider setting against your SQL Server
> > 2005 server instance to see whether it works.
> >
> >
> > #ASP.NET 2.0 App Service Config Issues When Not Installing Sql 2005 Express
> >
http://aspadvice.com/blogs/plitwin/archive/2005/11/04/13590.aspx > >
> > Hope this helps. If there is anything unclear or any other information you
> > wonder, please feel free to let me know.
> >
> >
> > 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.
> >
> >
> >