Membership provider does not connect to db

C

Carlos

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:

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
provider.

I se the database created using my Microsoft SQL Server Management Studio,
The connection string looks fine in web.config i.e.:

<remove name="LocalSqlServer" />

<add name="LocalSqlServer" connectionString="Data
Source=server\SQLSERVER2005;Initial Catalog=aspnetdb;Integrated
Security=SSPI;"

providerName="System.Data.SqlClient" />



When I tried the security tab on the tool I got:

An error occurred while attempting to initialize a
System.Data.SqlClient.SqlConnection object. The value that was provided for
the connection string may be wrong, or it may contain an invalid syntax.
Parameter name: connectionString

I do have another connectionString that points to the application data, and
resides in the same sql server instance, and works fine. I can see the
aspnedb as part of the databases in the instance.

Thanks in advance for any help,



Carlos.
 
M

Mark Fitzpatrick

Does the ASP.Net user account have permissions to login and view the
aspnetdb? That's usually the biggest issue when using integrates security in
the connection string.
 
C

Carlos

Mark,

thank you for your help. I just saw your note, and wanted to reply to you.
Yes, I have the ASP .Net user account (NT AUTHORITY\NETWORK SERVICE), and
<myserver>\ASPNET accounts in the db_owner role.

Thanks again,

Carlos.
 
M

Mohsin Rizvi

Hello Carlos!

Thanx for putting up an issue.
I assume that you have assigned proper rights to 'NT AUTHORITY\NETWORK
SERVICE' user account.
Secondly, try omitting domain name from the datasource of
connectionString attribute.

And if it doesn't work, do paste your web.config here so we can have a
close look in to your problem.

Do let me know in any case.
Regards,
Mohsin Rizvi
 

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

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top