2011-06-29 142 views
1

我在ASP.Net中创建了一个Web站点(不是Mvc,我忘了其他名称)。ASP.NET登录问题

完成网页后。我点击“生成”按钮,尝试注册到一个正常的asp.net登记表格在网站上,我歌厅此错误:

An error occurred during the execution of the SQL file 'InstallCommon.sql'. The SQL error number is 5123 and the SqlException message is: CREATE FILE encountered operating system error 5(failed to retrieve text for this error. Reason: 15105) while attempting to open or create the physical file 'C:\INETPUB\WWWROOT\ALON\APP_DATA\ASPNETDB_TMP.MDF'. CREATE DATABASE failed. Some file names listed could not be created. Check related errors. Creating the ASPNETDB_0e95afe2ec5d4f3d93bb9e61527a5bcf database...

我使用Windows 7的视觉IIS7.5 Stuido 2010 Pro。

任何人都有如何解决这个问题的想法?

+1

听起来像ASPNETDB_TMP.MDF被其他进程锁定。你确定你没有打开另一个解决方案吗?你重新启动VS,你的电脑? –

+0

我已经关闭所有视觉stuiods形式是opend,重新设置是7.5,仍然不工作,我没有重置计算机..但我没有thnik它有任何影响。 –

+0

它可能是一个安全问题。也许您的Web应用程序运行的帐户没有权限在SQL Server Express实例中创建数据库。 –

回答

0

我想你正在使用标准的登录表单以及Membership API。将SQL Server Express Edition与ASP.NET结合使用时,SqlMembershipProvider可以创建一个数据存储,供您的成员资格提供程序自动使用。但是,使用任何其他版本的SQL Server时,必须手动创建此数据存储。

您可以使用aspnet_regsql.exe工具,然后配置您的连接字符串。

希望这tutorial将有所帮助。

0

您的应用程序池运行的用户应该有权在您使用的SQL实例中创建数据库。尝试将应用程序池中的用户临时更改为管理员(假设您在开发计算机上而不是生产中)。