VS2008 using SQL2k as membership provider?

R

rockdale

I have spent half day on this issue already, do not know what's wrong.
Please help.

I am trying to use SQL2k instead SQM2k5 express as my membership
provider.

but when I try to config it using asp.net configuration tool, I got
the following 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 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 has
occurred while establishing a connection to the server. When
connecting to SQL Server 2005, this failure may be caused by the fact
that under the default settings SQL Server does not allow remote
connections. (provider: Named Pipes Provider, error: 40 - Could not
open a connection to SQL Server).



The error message sounds strange, why they use named pipe to connect?
Also, How VS2008 know its sql2k or sql2k5 since they use the same
System. Data.SqlClient??

----------------------

My config file looks like

<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=.
\SQLExpress;Integrated Security=True;User
Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf"
providerName="System.Data.SqlClient"/>
<add name="MSSql2k" connectionString="Data
Source=local;database=mydb;uid=**;pwd=**;"
providerName="System.Data.SqlClient"/>
</connectionStrings>



<membership defaultProvider="MySqlMembershipProvider">
<providers>
<add connectionStringName="MSSql2k"
enablePasswordRetrieval="false"
enablePasswordReset="true" requiresQuestionAndAnswer="true"
applicationName="MyAppl" requiresUniqueEmail="true"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="6" minRequiredPasswordLength="2"
minRequiredNonalphanumericCharacters="0"
passwordAttemptWindow="10"
passwordStrengthRegularExpression=""
name="MySqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider" />
</providers>
</membership>

I used aspnet_sqlreg.exe to succesfully register my sql2k database,
and in VS2008 server explorer I can see all the tables views and SPs.

If I change to use LocalSqlServer, then it works fine....

Thanks in advance

-rockdale
 
R

rockdale

I double checked my connection string:

it works on
<add name="LocalSqlServer" connectionString="Data
Source=myComputerName;database=myDB;uid=**;pwd=**;"
providerName="System.Data.SqlClient"/>
or
<add name="LocalSqlServer"
connectionString="Server=(local);database=sunodeuo;uid=sa;pwd=purvis;"
providerName="System.Data.SqlClient"/>

I forgot the "( )" around "local".

Now using LocalSqlServer works, as Scootgu's blog, we can simplly
change the LocalSqlServer to point to the sql2k or sql2k5, but I still
want to try MSSql2k connectionString and mySqlMembershipProvider, as
following.

-------------------------------------------------------------------------------
<roleManager enabled="true" defaultProvider="myRoleProvider">
<providers>
<clear/>
<add connectionStringName="MSSql2k"
applicationName="myAppl"
name="myRoleProvider"
type="System.Web.Security.SqlRoleProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</roleManager>
<membership defaultProvider="mySqlMembershipProvider">
<providers>
<clear/>
<add connectionStringName="MSSql2k"
enablePasswordRetrieval="false"
enablePasswordReset="true" requiresQuestionAndAnswer="true"
applicationName="myAppl" requiresUniqueEmail="true"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7"
minRequiredNonalphanumericCharacters="1"
passwordAttemptWindow="10"
passwordStrengthRegularExpression=""
name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />


<add connectionStringName="MSSql2k" applicationName="myAppl"
enablePasswordRetrieval="true" enablePasswordReset="true"
requiresQuestionAndAnswer="true"
requiresUniqueEmail="true" passwordFormat="Encrypted"
maxInvalidPasswordAttempts="5"
passwordAttemptWindow="10" minRequiredPasswordLength="7"
minRequiredNonalphanumericCharacters="0"
name="mySqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</membership>

------------------


But when I choose Select a different provider for each feature
(advanced)


Use this page to select a provider for each feature.

Membership Provider
AspNetSqlMembershipProvider Test
mySqlMembershipProvider Test

Role Provider
myRoleProvider (HERE IT DOES NOT HAVE Test hyperlink)

is the roleProvider working even though there is no test hyperlink
since the Membership Provider is working.?
Again thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top