How do i run aspnet_regsql on sql azure? [duplicate]

耗尽温柔 提交于 2019-12-13 11:41:28

问题


Possible Duplicate:
Migrating ASP.NET Membership Database to SQL Azure

How do I run aspnet_regsql on sql azure database? I made it work the hard way, by exporting all db objects over. However, I seriously believe that there's an easier way. Please help.


回答1:


When you run aspnet_regsql on sql azure database, the error occurs only because SQL Azure does not support the USE statement to switch database contexts when it executes commands against SQL Azure databases.

To work around this, Microsoft created a hotfix. The following steps show you how to use the tool that is provided by the hotfix.

  1. Download the aspnet_regsqlazure.zip file from the hotfix page.
  2. Extract the contents of the file to a location on your local hard drive.
  3. Open a command prompt and navigate to the directory where you extracted the files.

Use the following command line to execute the tool (substitute your server name, database name, logon, and password where appropriate).

aspnet_regsqlazure -s [your server name].database.windows.net -d [your database name] -u [your user name]@[your server name] -p [your password] -a mr



回答2:


Membership Provider generated by aspnet_regsql.exe is out dated.

Please use new Universal Providers which is Azure compatible.

Update - 7/23/2015

Microsoft has new membership called Identity. Current version is 2 as of this writing.



来源:https://stackoverflow.com/questions/11158478/how-do-i-run-aspnet-regsql-on-sql-azure

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