简体   繁体   中英

Using SQL server 2008 for ASP.net 2.0 Membership provider

I tried to set-up the SQL tables for ASP .net 2.0 membership provider by clicking on ASP.net Configuration under Project.

I have completely uninstalled SQL 2005 Express and installed SQL 2008 Express instead.

It seems like that it can not connect to the database.

Does anybody know how to get this fixed so I can use 2008 instead ?

Try to configuring the database typing "aspnet_regsql" on the VS command prompt.

Then setup the database and finally change de connection string on the web.config file.

ASP.NET SQL Server Registration Tool (Aspnet_regsql.exe)

The connectionStringName used in the membership Tag should be changed to the present connection string where you have the membership tables created.

If the connectionStringName is not pointing to a valid connection String name in the connectionStrings tag, the membership tables can not be used by the application.

What is your SQL 2008 installation instance called? What does your connection string for the membership provider look like?

As far as I know, there is (or was) a glitch in the SQL Server 2008 Express installation that even if you chose to install as "default" instance, it would still make it a "named instance" called ".\\SQLExpress" instead. Could that be the problem?

Marc

As Marc already has pointed out, it could be the problem with the instance name. This is fixed in service pack 1 for SQL Server 2008 Express. For more information and a workaround, see this Microsoft KB article .

SQL 2005 and 2008 are both configured in a fairly locked down state by default - and this means that SQL won't accept access the database other than through Shared Memory, even with Integrated Security.

You need to enable TCP/IP or Named Pipes for the Client Protocols for the server (as this is how ASP.NET talks to SQL if you've not configured a DSN to use Shared Memory.

I can't remember the exact steps in 2k8, as I've only had to do it once, but in 2k5 you had to open the SQL Server Configuration Manager, select SQL Native Client Configuration, Client Protocols, and enable TCP/IP and Named Pipes - it's a similar process for 2k8 as I recall.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM