使用ASP.NET MVC和Entity Framework的Autohosted App [英] Autohosted App using ASP.NET MVC and Entity Framework
问题描述
您好,
我正在使用ASP.NET MVC开发SharePoint自动应用程序。我的解决方案中有三个项目:SharePointApp,SharePointAppWeb和SQLServerDB项目。该应用程序部署到SharePoint Online(Office 365)和SQL Db到Azure SQL。在我的MVC项目
我使用EF,DbContext类和数据模型类。
I am developing a SharePoint Autohosted App with ASP.NET MVC. I have three projects in my solution: SharePointApp, SharePointAppWeb and SQLServerDB projects. The app is deployed to SharePoint Online (Office 365) and SQL Db to Azure SQL. In my MVC project
I am using EF, DbContext class and data Model classes.
项目的所有配置都与本文类似:
All configuration of the projects is done similar to this article:
http://blogs.msdn.com/b/officeapps/archive/2012/08/13/using-a-sql-database-with-autohosted-apps-for- sharepoint.aspx?wa = wsignin1.0
http://blogs.msdn.com/b/officeapps/archive/2012/08/13/using-a-sql-database-with-autohosted-apps-for-sharepoint.aspx?wa=wsignin1.0
应用程序正常运行,但涉及Db的部分除外。使用DbContext的页面我收到错误页面,说:
App is running fine, except the parts where Db is involved. Pages that use DbContext I got the error page, saying:
" Unknown User。无法确定您的身份。请通过启动您网站上安装的应用再试一次。"
同样的解决方案在localhost上完美运行!
The same solution works perfectly on localhost!
什么可以这是问题吗?谢谢!
What can be the problem here? Thanks!
推荐答案
您好
这篇关于使用ASP.NET MVC和Entity Framework的Autohosted App的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!