| Jason Vermillion 2007-01-30, 7:10 pm |
| Ted,
If you dont see entries for <connectionStrings> and <membership> settings in
you app's web.config then check your machine.config file. If not there, then
check for a web.config at your root web level.
Your machine and root web configs are probably located at:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\
You can either change your settings in the machine.config or override them
for just your app in your application's web.config. If you decide to
override the defaults by using your web.config then also make sure to clear
the providers settings and specify a value for the applicationName tag.
In your web.config...
<connectionStrings>
<add
name="MyAspnetDB"
connectionString="data source=.\SQLEXPRESS;Integrated
Security=SSPI;AttachDBFilename=|DataDire
ctory|aspnetdb.mdf;User Instance=true"
providerName="System.Data.SqlClient"
/>
</connectionStrings>
<system.web>
<membership>
<providers>
<clear />
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="MyAspnetDB"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
applicationName="MyApplicationName"
requiresUniqueEmail="true"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="7"
minRequiredNonalphanumericCharacters="1"
passwordAttemptWindow="10"
passwordStrengthRegularExpression="" />
</providers>
</membership>
</system.web>
Hope this helps,
Jason Vermillion
"Ted" wrote:
> In WSAT, I get the following error when trying to set up my provider:
>
> 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.
>
> On Windows XP Pro, I am using MS Visual Studio 2005, and I am using
> the developer's edition of MS SQL Server 2005 and NOT MS SQL SERVER
> 2005 EXPRESS!
>
> I used the aspnet_regsql tool and it did create the database in SQL
> Server 2005 without difficulty. If I open the instance of SQL Server
> 2005 I used, I can see the database it created.
>
> How to I tell WSAT to use SQL Server 2005 instance of SQL Server 2005
> Express?
>
> I assume there is a connection string hiding somewhere, but where is
> it. It is certainly not in the default web.config file. That file is
> mostly empty! In fact, the file Visual Studio created for me contains
> only the following:
>
> <?xml version="1.0" encoding="utf-8"?>
> <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/
> v2.0">
> </configuration>
>
> What I will aim for, eventually, is to specify the machine and
> instance name (or even to specify another database product such as
> MySQL or PostgreSQL, if that is possible - MySQL provides .NET, but I
> haven't found that for PostgreSQL). Can any data provider be used to
> support the login process?
>
> Thanks
>
> Ted
>
>
|