473,399 Members | 3,603 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,399 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 6897
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.