473,769 Members | 5,727 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 connnectionStri ng.

However, when I try to test the connection (i.e. AspNetSqlProvid er), 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="LocalSqlS erver" />

<add name="LocalSqlS erver" connectionStrin g="Data
Source=server\S QLSERVER2005;In itial Catalog=aspnetd b;Integrated
Security=SSPI;"

providerName="S ystem.Data.SqlC lient" />

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

An error occurred while attempting to initialize a
System.Data.Sql Client.SqlConne ction object. The value that was provided for
the connection string may be wrong, or it may contain an invalid syntax.
Parameter name: connectionStrin g

I do have another connectionStrin g 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 6919
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*****@earthl ink.netwrote in message
news:OT******** ******@TK2MSFTN GP02.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 connnectionStri ng.

However, when I try to test the connection (i.e. AspNetSqlProvid er), 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="LocalSqlS erver" />

<add name="LocalSqlS erver" connectionStrin g="Data
Source=server\S QLSERVER2005;In itial Catalog=aspnetd b;Integrated
Security=SSPI;"

providerName="S ystem.Data.SqlC lient" />

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

An error occurred while attempting to initialize a
System.Data.Sql Client.SqlConne ction object. The value that was provided
for the connection string may be wrong, or it may contain an invalid
syntax. Parameter name: connectionStrin g

I do have another connectionStrin g 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\NETWO RK SERVICE), and
<myserver>\ASPN ET accounts in the db_owner role.

Thanks again,

Carlos.
"Mark Fitzpatrick" <ma******@fitzm e.comwrote in message
news:OJ******** ********@TK2MSF TNGP05.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*****@earthl ink.netwrote in message
news:OT******** ******@TK2MSFTN GP02.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
sqlserver200 5 instance of my server. I noticed that the web.config file
got updated with the
entries that include the connnectionStri ng.

However, when I try to test the connection (i.e. AspNetSqlProvid er), 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
Administrati on 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="LocalSqlS erver" />

<add name="LocalSqlS erver" connectionStrin g="Data
Source=server\ SQLSERVER2005;I nitial Catalog=aspnetd b;Integrated
Security=SSPI; "

providerName=" System.Data.Sql Client" />

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

An error occurred while attempting to initialize a
System.Data.Sq lClient.SqlConn ection object. The value that was provided
for the connection string may be wrong, or it may contain an invalid
syntax. Parameter name: connectionStrin g

I do have another connectionStrin g 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\NETWO RK
SERVICE' user account.
Secondly, try omitting domain name from the datasource of
connectionStrin g 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\NETWO RK SERVICE), and
<myserver>\ASPN ET accounts in the db_owner role.

Thanks again,

Carlos.
"Mark Fitzpatrick" <ma******@fitzm e.comwrote in message
news:OJ******** ********@TK2MSF TNGP05.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*****@earthl ink.netwrote in message
news:OT******** ******@TK2MSFTN GP02.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 connnectionStri ng.

However, when I try to test the connection (i.e. AspNetSqlProvid er), 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="LocalSqlS erver" />

<add name="LocalSqlS erver" connectionStrin g="Data
Source=server\S QLSERVER2005;In itial Catalog=aspnetd b;Integrated
Security=SSPI;"

providerName="S ystem.Data.SqlC lient" />

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

An error occurred while attempting to initialize a
System.Data.Sql Client.SqlConne ction object. The value that was provided
for the connection string may be wrong, or it may contain an invalid
syntax. Parameter name: connectionStrin g

I do have another connectionStrin g 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
3560
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 custom membership provider fine and removes the security question/answer fields as designated in the custom provider. The problem is that when I try to create a new user in the create user wizard by entering the info and pressing the 'create...
9
2175
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. It does not currently use any of the Commerce Server 2002 functionality with the exception of the user authentication features. I have written my replacement application to use a custom login form and custom connection string so that I can use...
3
1632
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 Site Administration Tool (WAT) but it won't sense my SQLServer 2000 database.
5
2043
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 Administrator Tool and then hit on Security I get this 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
1
1608
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 create users using batch file from our customers and in doing this we will need to access the new asp.net membership security from vb.net 2005. I have created a reference to system.web and can see all the classes and members but there doesnt seem...
2
14157
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 provider? For e.g. lets say I have a SQLMembership provider and OracleMembership provider. SQL would be my default provider. During authentication, based on the value of an additional parameter in the login screen, I need to validate against SQL or...
4
4733
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 above and beyond what the prodiver currently allows. I need the ability to access a user id and the user's permission id. With Forms authentication in 1.1, I would just create a custom identiy and principal and store the information in the identity....
0
1445
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 "http://IP:portname" or "http://localhost:portname" Web site has custom 'Login control' and custom 'Membership provider'; and I do not have access to 'Login control' control code. MembershipProvider::Validateuser() is returning true irrespective of...
3
1788
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 user a unique customerid. All users beloning to the same custeromid would see the same information on the website. Can I easily do this using membership services or must I use a combination of membership services and profiles?
0
10039
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9990
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8869
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7406
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6668
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5297
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5445
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3955
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2814
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.