【发布时间】:2012-06-25 17:50:14
【问题描述】:
我最近向 Microsoft Azure 发布了一个 MVC3 应用程序,在一些帮助下,我能够让我的 EF 数据库正常工作。但是,我在使用默认角色和用户时遇到了问题,而不是为管理员登录等创建自己的表。
我找到了需要您运行 Aspnet_regsql.exe 的答案,但我收到以下错误:
Setup failed.
Exception:
An error occurred during the execution of the SQL file 'InstallCommon.sql'.
The SQL error number is 40508 and the SqlException message is: USE statement
is not supported to switch between databases. Use a new connection to connect
to a different Database.
我搜索了这个错误,发现它不适用于 Windows Azure。它让我看到了这篇文章,它有助于解释原因并给出了解决方案:http://thinkfirstcodelater.com/blog/?p=637
它告诉我下载以下文件并运行它们。 http://archive.msdn.microsoft.com/KB2006191/Release/ProjectReleases.aspx?ReleaseId=3539
问题是,当我运行该文件夹中的应用程序时,命令行出现并消失。我看不到它在说什么,只是它失败了。我该怎么做才能解决这个问题?
原来的问题源于这个:
Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.
当我尝试登录自己的网站时显示。
任何帮助将不胜感激。谢谢!
【问题讨论】:
标签: asp.net asp.net-mvc-3 azure azure-sql-database