Dnn 模块网站页面在 dnndev.me 中有效,但未在我的 Azure Web 应用程序中加载数据

Dnn module website page works in dnndev.me but does not load data in my Azure web app

Visual Studio 中的编码 dnn 模块,该模块绑定到 entity framework 项目。在我在本地 windows 服务器上设置的 dnndev.me 页面上运行良好。我部署到 Azure,确保我的 entity frameworks dll 文件已上传。在我的 azure dnn web 应用程序上安装了我的 dnn 模块作为扩展。添加了一个新页面,将我的模块添加到该页面,它可以显示所有按钮、文本框等,但没有数据加载。我在我的 Azure Web 应用程序上设置了远程调试,发现了一个连接字符串问题。我更正了 azure webconfig 连接字符串问题,仍然没有数据加载。再次进行远程调试,现在显示Entity Framework错误我不知道如何解决:

{"Schema specified is not valid. Errors: \r\nEFModel.GradLinxModel.ssdl(2,2) : error 0152: No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'. Make sure the provider is registered in the 'entityFramework' section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information."} System.Exception {System.Data.Entity.Core.MetadataException}

这是我在 azure webconfig 文件中使用的连接字符串:

add name="Entities" connectionString="metadata=res:///EFModel.GradLinxModel.csdl|res:///EFModel.GradLinxModel.ssdl|res://*/EFModel.GradLinxModel.msl;provider=System.Data.SqlClient;provider connection string="data source=tcp:mbansesql1.database.windows.net,1433;initial catalog=mbanse-mscst-dnn;User ID=myuserid;Password=mypw;App=EntityFramework"" providerName="System.Data.EntityClient"

有什么建议吗?谢谢

如果您忘记包含 "EntityFramework.SqlServer.dll",您也会看到此消息。

还有

其他可能性

您已将 EF 添加到 class 库项目中,您还需要将其添加到引用它的项目中