有没有办法通过Url获取List对象?
我知道你可以通过标题获得一个列表:
ClientContext context = new ClientContext("http://foo");
List list = context.Web.Lists.GetByTitle("title");
context.Load(list);
context.ExecuteQuery();
Run Code Online (Sandbox Code Playgroud)
但我希望用户能够在文本框中将浏览器中的URL复制粘贴(例如http://foo/subsite/ListName/Forms/AllItems.aspx),然后从该URL中提取List对象.
对这么长的帖子表示歉意,但我已经在这个问题上工作了几天,但似乎找不到解决方案。
我想通过将 Azure 中的 Cosmos DB 放置在虚拟网络 (VNet) 中来限制对它的访问,并且只允许通过 Function 应用进行访问。
第一部分很简单:创建 Cosmos DB 和 VNet,并按照此处所述配置数据库的服务终结点。
将 Function 应用连接到 VNet 可以通过两种方式完成。
按照本指南,我已使用网关子网配置我的 VNet,并按所述添加和配置 VPN 网关。
之后,我将网关子网添加到 Cosmos DB 服务端点配置并设置我的 Function App
这种方法更容易设置,但正如微软文档中所述,它不适用于生产工作负载。
配置更容易,但由于结果是相同的,我在本文的其余部分中省略了此选项。
尝试从函数应用连接到 Cosmos DB 时,我不断收到连接错误:
{
"Message": "An error has occurred.",
"ExceptionMessage": "Unable to proceed with the request. Please check the authorization claims to ensure the required permissions to process the …Run Code Online (Sandbox Code Playgroud)