Indeed, very reasonable....
The thing is, the LocalSqlServer connection string comes preinstalled with .NET. So, by default, every site that uses provider features will end up this connection sting.
Scott's suggestion works good, but IMO, it's a bit weird. Having a LocalSqlServer that points to a RemoteSqlServer feels unnatural.
So, instead of redefining LocalSqlServer, you can redefine the providers instead. For example:
Code:
<membership>
<providers>
<clear />
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="BugBase"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
applicationName="/"
requiresUniqueEmail="true"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="5"
passwordAttemptWindow="10"
passwordStrengthRegularExpression=""
/>
</providers>
</membership>
With this code in web.config, you tell ASP.NET to look at the connection defined in connectionStringName instead of the one on LocalSqlServer.
You can do the same with the other provider based features.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of
ASP.NET 2.0 Instant Results and
Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out
this post.