Azure和ASP身份验证

时间:2013-03-27 19:34:31

标签: asp.net .net azure console-application database-migration

我正在转换要与Azure数据库一起使用的应用程序。我在ASP会员资格方面遇到了一些问题。我发现了一些关于此的文章,但并不是我正在做的事情。

我现在遇到的问题是我使用Migrator.NET控制台应用程序来执行数据库迁移。我的第一个迁移使用以下代码设置ASP成员资格部分。

// Install Membership and Roles to the database with the Asp.Net installer.
SqlConnectionStringBuilder connectionBuilder = new SqlConnectionStringBuilder(connection.ConnectionString);
SqlServices.Install(connectionBuilder.InitialCatalog, SqlFeatures.Membership | SqlFeatures.RoleManager, connection.ConnectionString);

这会导致InstallCommon.sql错误。

我从另一篇文章中找到了这篇文章。

http://www.hanselman.com/blog/IntroducingSystemWebProvidersASPNETUniversalProvidersForSessionMembershipRolesAndUserProfileOnSQLCompactAndSQLAzure.aspx

我安装了Microsoft.AspNet.Providers软件包,但这就是我遇到的问题。

现在我收到错误“数据库连接字符串尚未设置。”

我在db.config文件中设置了连接字符串,该文件在添加新包之前有效。现在连接字符串是否需要在其他地方?有没有更好的方法来解决这个问题?

0 个答案:

没有答案