سؤال

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?

هل كانت مفيدة؟

المحلول

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:

  1. Microsoft Support Article
  2. Implementing a Membership Provider
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top