Thursday, March 29, 2012

login controls don't find database, since I'm not using sqlexpress

I'm using Visual Web Developer (VWD), and I'm trying to experiment with
the "log in" controls. I want to have a password screen come up for
general users of the site.
The problem is, that VWD uses a database to store the userids and
passwords, and it can't find sql server.
When I first set up VWD, it asked me if I wanted to install sql
express. I said no, because I already had sql server on my PC.
Maybe thats the problem, VWD does not know where SQL Server is, or how
to gain access to it. So it cannot set up the login feature.
Is this fixable?
-- HAYou're going to need to edit your Web.config file as follows:
code:

<
configuration ... >
<
connectionStrings>
<
clear />
<
add connectionString="..." name="Default" />
<
/connectionStrings>
<
/configuration>

The value of connectionString will depend on your particular Sql Server setu
p. Try a Google for 'asp.net connection string' for help with that.
Once you have the connection setup, you'll need to actually configure the me
mbership tables on a database. For this, you will need to use the aspnet_reg
sql tool (provided with ASP.NET). Do a Google for 'aspnet_regsql' and the fi
rst article will walk you through it.
-bgano

0 comments:

Post a Comment