Jump to content

using login control


sansat6699

Recommended Posts

hii am creating website where i am using default login controls provided in vs2005(C#) and sql server2000 as back end.problem is that i processed my database with aspregsql.exe fro creating necessary tables in my database. then i use connection string to connect to database.

<connectionStrings> <add name ="MyLocalSQLServer" connectionString ="Data Source=comp01;Initial Catlog=asc;User Id=sa;Password=sa" providerName ="System.DataSqlClient" /> </connectionStrings> <system.web>
then i provided membership settings as folows
<membership defaultProvider="MySqlMembershipProvider" > <providers> <clear/> <add name="MySqlMembershipProvider" connectionStringName="MyLocalSQLServer" applicationName="wes1" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </providers> </membership>
when try to use asp.net configuration utility error fro creating user as follows
"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 also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.The following message may help in diagnosing the problem: 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 had given necessary permission for sql database.i used article from linkhttp://msdn2.microsoft.com/en-us/library/ms998317.aspxto do this but i am not able to connect to my database on sql2000how can i use login controls with sql server2000 database as data store. healp me.
Link to comment
Share on other sites

I see three possible problems with your connection string setting in your web.config.The first problem, which may not be a problem at all, is that there is a space between the keys and the equals sign. Rather than "connectionString =", you might try "connectionString=".The second problem, and more likely cause of this issue, is that "Initial Catalog" is misspelled. Your connection string has "Initial Catlog".Finally, the providerName appears to be referencing an invalid namespace. I believe you mean to use "System.Data.SqlClient" rather than "System.DataSqlClient".So, try this as your key in the web.config:

<add name="MyLocalSQLServer" connectionString="Data Source=comp01;Initial Catalog=asc;User Id=sa;Password=sa" providerName="System.Data.SqlClient" />

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...