473,396 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 6896
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John | last post by:
Hi I was working fine with create user wizard and the default membership provider. I have now customised the membership provider as per attached web.config. The create user wizard picks up the...
9
by: Paul Keegstra | last post by:
Hi, I am currently working on an asp.net 2.0 web site that is a replacement of a classic asp web site. The current web site uses a Commerce Server 2002 database for storing user information. ...
3
by: Dan Sikorsky | last post by:
Can I use SQLServer 2000 with ASP.NET 2.0 instead of SQLServer 2005, and use the .Net 2.0 Membership functionality? I've setup my Login page, controls, etc., and now it's time to use the Web...
5
by: Vishal Gupta | last post by:
Hi This is Vishal this side.I have been trying to create a new sample website using the new Membership Provider Class. Now when I try to a create a new website and then hit on the Website...
1
by: Karl | last post by:
We have an application that uses the new ASP.Net 2.0 membership security, but we are writing the backoffice administration for it in vb.net as an in house product. We would like to be able to...
2
by: Balaji | last post by:
Hi All, Can I use more than one membership provider for a given website? I understand only one of them could be default one. If yes, then how to programmatically access the other membership...
4
by: =?Utf-8?B?Q2hyaXMgQ2Fw?= | last post by:
I have been having some trouble with implementing a custom Membership Provider. We have a custom data store and business logic that pulls user information. I need some level of functionality...
0
by: asnowfall | last post by:
After logging in, I am not able to redirect to the target url; and this happens only when I connect to the website using "http://machine- name:portname"; but not if I connect using either...
3
by: dm3281 | last post by:
Hello -- I need to write an ASP.NET 2.0 application for our clients to use to login and verify file transmissions. Each client will need their own logon, in addition to a way to assign each...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.