471,595 Members | 1,840 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,595 software developers and data experts.

Membership provider does not connect to db

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.


Dec 9 '06 #1
3 6794
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.
--

Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"Carlos" <ch*****@earthlink.netwrote in message
news:OT**************@TK2MSFTNGP02.phx.gbl...
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.




Dec 9 '06 #2

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.
"Mark Fitzpatrick" <ma******@fitzme.comwrote in message
news:OJ****************@TK2MSFTNGP05.phx.gbl...
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.
--

Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"Carlos" <ch*****@earthlink.netwrote in message
news:OT**************@TK2MSFTNGP02.phx.gbl...
>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.





Dec 10 '06 #3
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

Carlos wrote:
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.
"Mark Fitzpatrick" <ma******@fitzme.comwrote in message
news:OJ****************@TK2MSFTNGP05.phx.gbl...
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.
--

Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"Carlos" <ch*****@earthlink.netwrote in message
news:OT**************@TK2MSFTNGP02.phx.gbl...
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.



Dec 11 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by John | last post: by
9 posts views Thread by Paul Keegstra | last post: by
5 posts views Thread by Vishal Gupta | last post: by
1 post views Thread by Karl | last post: by
4 posts views Thread by =?Utf-8?B?Q2hyaXMgQ2Fw?= | last post: by
3 posts views Thread by dm3281 | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.