I do have a problem with this tutorial after all.
The steps in the ActiveSkill tutorial ask you to create a SQL db with .sql files provided in the courseware.
This all goes to plan.
I then modified my ActiveSkillUI projects web.config, adding a connection string and a couple of role/membership providers.
Those 3 things look like this.
<
connectionStrings
>
<
add
name
=
"ActiveSkillConnectionString"
connectionString
=
"Data Source=NETDEV\SqlExpress;Initial Catalog=ActiveSkill;Integrated Security=True;User Id=ActiveSkillUser;Password=a0biozasu1"
providerName
=
"System.Data.SqlClient"
/>
</
connectionStrings
>
<
system.web
>
<
roleManager
enabled
=
"true"
>
<
providers
>
<
add
connectionStringName
=
"ActiveSkillConnectionString"
applicationName
=
"/ActiveSkill"
name
=
"RoleProvider"
type
=
"System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
/>
</
providers
>
</
roleManager
>
<
membership
>
<
providers
>
<
clear
/>
<
add
name
=
"AspNetSqlMembershipProvider"
type
=
"System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName
=
"ActiveSkillConnectionString"
enablePasswordRetrieval
=
"false"
enablePasswordReset
=
"true"
requiresQuestionAndAnswer
=
"false"
requiresUniqueEmail
=
"false"
passwordFormat
=
"Hashed"
maxInvalidPasswordAttempts
=
"3"
minRequiredPasswordLength
=
"7"
minRequiredNonalphanumericCharacters
=
"1"
passwordAttemptWindow
=
"10"
passwordStrengthRegularExpression
=
""
applicationName
=
"/ActiveSkill"
/>
</
providers
>
</
membership
>
etc etc...
Note I have a user login created for this database. That login is confirmed and working.
My problem is that despite the efforts above, the WSAT ASP.NET Configuration app, keeps creating and using an ASPNETDB.MDF db that it is annoyingly creating in my projects App_Data directory.
In an attempt to rid myself of this pointless database I tracked a reference to it back in the machine.config file.
In there it looked like this.
<
add
name
=
"LocalSqlServer"
connectionString
=
"data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
providerName
=
"System.Data.SqlClient"
/>
So, as a test I removed this line and put my own connectionsting in there.
However running the WSAT app again, it gets the following error.
An error was encountered. Please return to the previous page and try again.
The following message may help in diagnosing the problem: The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty. (C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\machine.config line 152) at System.Web. etc etc
As a final check (before posting this thread) is I searched my project for any reference to the connection string LocalSqlServer and found it does not exist.
This it a mystery to me. Anyone have some tips?
Cheers
Brad