Security Tab -error




I am following the lesson from here:
( about 4 min into it ).

When I click on "Website" and then Configuration, and then click on
Security I get an error.
There is a problem with your selected data store. This can be caused by an
invalid server name or credentials, or by insufficient permission. It can
also be caused by the role manager feature not being enabled. Click the
button below to be redirected to a page where you can choose a new data

The following message may help in diagnosing the problem: Unable to connect
to SQL Server database.
I now click on the "Providers" tab and click on
"Select a single provider for all site management data"
Then I click on "Test" beside the AspNetSqlProvider
and it Fails

Could not establish a connection to the database.
If you have not yet created the SQL Server 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

I have already gone into dos and ran: aspnet_regsql to create the aspnetdb
-This worked properly -I have the table and all the fields there. I have
confirmed this through the management studio.
I can go into my server management studio and I can see the file.
My server instance is the default one added "sqlexpress".
I have set my server instance to accept remote connections with named pipes
and tcp ip
( my service is running )
I have no issues connecting to datafiles with my server explorer.

What am I missing for this setup?
At first I thought it was my development server issue so i fully uninstalled
that and re-installed the sql express version thinking that was it.

I am now fully stuck.






I had to run aspnet_regsql and put in my server <servername>\SqlExpress
and mdf name <default> so it creates the file on my sql 2005 express server.

Solution #1.

Add this to my web.config file:

<remove name="LocalSqlServer" />

<add name="LocalSqlServer" connectionString="Integrated Security=SSPI;Data
Source=ORANGE\SQLEXPRESS ;Initial Catalog=aspnetdb;"
providerName="System.Data.SqlClient" />

Solution #2.

Go and copy the aspnetdb.mdf and ldf to my projects APP_Data folder.

Which is the correct solution? or is there a 3rd option?

I really do not understand what / why option 1 or 2 works and why and why i
need to set it up this way.



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