Default login asp.net MVC3

断了今生、忘了曾经 提交于 2019-12-11 03:57:48

问题


Where is the login information (username, password) actually stored by using the default template from ASP.NET MVC application in VS2010? I mean, is it physically registered in a database, file or something else?


回答1:


Upon registering the first user a database named ASPNETDB.MDF under the application’s App_Data directory is created. This information was supplied by default in the root web.config file.




回答2:


There is no default login. There is not even a database created when you start a new project. You need to register a new user by clicking on the Register link on the login page. When you register a new user you will be prompted to specify the username and password and a database file will be created in the App_Data folder. Now you can go ahead and login with the account you have just created. And by the way the same stands true for ASP.NET MVC 1.0 and 2.0 project templates.




回答3:


If you can't see the database under App_data, try clicking "Show all Files" which is one of the icons at the top of the solutions explorer. Then the database will show under App_data as something like ASPNETD8.MDF.



来源:https://stackoverflow.com/questions/4781860/default-login-asp-net-mvc3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!