小编mal*_*eff的帖子

WebSecurity.InitializeDatabaseConnection方法只能调用一次

我正在尝试使用Windows Azure来托管MVC4 Web应用程序.我创建了一个测试应用程序,使用VS2012 MVC4互联网应用程序模板并添加了自定义模型和控制器.

我已经在Azure上发布了它并设法将"update-database"应用于Azure数据库.

当我在本地尝试应用程序,但使用Azure SQL数据库,它工作正常.我可以登录/注册并使用我的测试控制器.

当我在线试用应用程序时,我可以使用测试控制器,但登录或注册链接会出现以下异常:

Server Error in '/' Application.

The "WebSecurity.InitializeDatabaseConnection" method can be called only once.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidOperationException: The "WebSecurity.InitializeDatabaseConnection" method can be called only once.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding …
Run Code Online (Sandbox Code Playgroud)

asp.net-mvc azure

12
推荐指数
2
解决办法
6404
查看次数

标签 统计

asp.net-mvc ×1

azure ×1