将本地数据库连接到 ASP.NET
Connect on-promise database to ASP.NET
我在将 on-promise 数据库连接到 SharePoint online 时遇到一些困难。
一旦用户离开本地网络,就需要数据库连接 VPN。
基本上,我们有一些数据库视图,我们希望将它们显示在我们的 SharPoint 在线上。
SharePoint 2013 在线 E3
SQL 服务器
活动目录
我们需要一个指南,了解如何在不使用 public PI 的情况下在线访问 SharePoint 上的此数据库。基本上,我们正在尝试找到一种通过安全连接来连接此数据库的方法。
目标是开发asp.net应用,
选项列表
WCF
网络API技术
连接 SharePoint:
Using Azure Hybrid Connection
,BCS with Azure Web App hosting WCF endpoint, we can now expose on-premises SQL data
to SharePoint Online and Cloud
by external content types (ECTs
) or SharePoint Hosted Apps
.
下面是 two
方法,BCS
可以通过这些方法将这些数据源连接到 SharePoint
:
1. Azure Web App hosting WCF Service and External Lists
2. Azure Web App hosting WCF Data Service and Hosted Apps
优点:
The advantage of using this approach is the reusability
of External
Content Types (ECT
). ECTs can be used across multiple lists and sites
in the same site collection. ECTs can also be used for complex
associations across multiple types of data
.
public static void InitializeService(DataServiceConfiguration config)
{
// TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);
config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V3;
config.UseVerboseErrors = true;
}
我在将 on-promise 数据库连接到 SharePoint online 时遇到一些困难。
一旦用户离开本地网络,就需要数据库连接 VPN。
基本上,我们有一些数据库视图,我们希望将它们显示在我们的 SharPoint 在线上。
SharePoint 2013 在线 E3
SQL 服务器
活动目录
我们需要一个指南,了解如何在不使用 public PI 的情况下在线访问 SharePoint 上的此数据库。基本上,我们正在尝试找到一种通过安全连接来连接此数据库的方法。
目标是开发asp.net应用, 选项列表
WCF
网络API技术
连接 SharePoint:
Using
Azure Hybrid Connection
,BCS with Azure Web App hosting WCF endpoint, we can now expose on-premisesSQL data
to SharePointOnline and Cloud
by external content types (ECTs
) orSharePoint Hosted Apps
.
下面是 two
方法,BCS
可以通过这些方法将这些数据源连接到 SharePoint
:
1. Azure Web App hosting WCF Service and External Lists
2. Azure Web App hosting WCF Data Service and Hosted Apps
优点:
The advantage of using this
approach is the reusability
of External Content Types (ECT
). ECTs can be used across multiple lists and sites in the same site collection. ECTs can also be used forcomplex
associationsacross multiple types of data
.
public static void InitializeService(DataServiceConfiguration config)
{
// TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);
config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V3;
config.UseVerboseErrors = true;
}