问题
I am trying to create a login function with SQL server 2008 express and Visual Web Developer 2008 Express.
I tried Using a Login status and Login controll / Running the page without debugging and then attempting to login. I was told this would create a ASPNETDB.MDF. file; Instead it gave me an error. I then attempted to create a database in my AppData section of Visual web developer and it gave me this error:
connections to sql server files (.mdf) Require sql server 2005 to function properly. please verify the installation of the component or download from (url).
I have sql 2008 express installed and (to my knowledge) Need ASPNETDB.MDF to create a login system on my site. Am i going to have to downgrade my sql server in order to get a functioning login on my site?
回答1:
ASPNETDB.MDF is the default database for using the ASP.NET Application Services, which includes profiles, roles, membership and more. You can use the supplied membership providers that are included with the .NET Framework, or you can implement your own providers.
You do not have to downgrade SQL Server in order to get a functioning login on your site. To resolve the error message, verify that SQL Server express edition is properly installed and is currently running on the system. You can use SQL Server Configuration Manager to check and start the SQL instances that are installed on the system.
If the SQL Server Express instance is running, check if Visual Studio is pointing to the correct SQL instance. You can do this by navigating to Data connections under Tools -> Options in Visual Studio IDE.
Links:
- Microsoft Support Article
- Implementing a Membership Provider
来源:https://stackoverflow.com/questions/13050262/creating-mdf-with-sql-2008-express-visual-web-developer-2008