简体   繁体   中英

Using VS2010 website template with an existing database?

Sorry if this is an obvious question, but my knowledge of asp.net is a bit patchy.

I need to make a quick website to act as a web frontend to some software I have made. I just created a website from the Asp.Net website template in VS2010, and was pleasantly suprised to see that this template comes almost fully built - for instance, when handling user registration/login.

However, I need the user registration/login system to go through an existing SQL Server database I have created. How do I set this up?

I tried changing the connection string from the default:

<add name="ApplicationServices"
 connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
 providerName="System.Data.SqlClient"/>

to this:

<add name="ApplicationServices"
 connectionString="Server=MININT-8PNI9PD\SQLEXPRESS;Database=CourtListNotifier; Integrated Security=SSPI;"
 providerName="System.Data.SqlClient"/>

However, this doesn't work - the site complains about missing a required stored procedure.

How do I solve this? I want to get the site working as quickly as possible, and so I want to change the template only a little to meet my needs, without using lots of time to write a large customized login system.

您可以使用aspnet_regsql.exe实用程序来创建一个遵循所需架构的数据库。

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