小编Eri*_*ult的帖子

Microsoft Graph 支持编辑打开的 PowerPoint 文件

我有一个场景,用户打开的 PowerPoint 演示文稿需要通过自定义解决方案进行修改。我正在考虑将 PowerPoint Web 插件与 Graph API 对 OneDrive/SharePoint 文件的支持结合使用。

但是,PowerPoint 在 JavaScript for Office API 中还没有专门用于替换正在编辑的演示文稿内容的功能。作为概念证明,我尝试使用 Graph 使用upload 命令覆盖 OneDrive 中的特定 PowerPoint 文件,但它会引发错误,因为该文件是在 PowerPoint for Windows 中打开的:

Status Code: 423 Microsoft.Graph.ServiceException: Code: resourceLocked 
Message: The resource you are attempting to access is locked 
Inner error:    AdditionalData:     
                date: 2020-10-05T21:06:53   
                request-id: 5e3c2604-382d-4139-a433-8b95ef4f619e    
                client-request-id: 5e3c2604-382d-4139-a433-8b95ef4f619e 
ClientRequestId: 5e3c2604-382d-4139-a433-8b95ef4f619e
Run Code Online (Sandbox Code Playgroud)

我注意到,如果我在 PowerPoint Online 中打开同一个文件,共享图标指示器就会触发,我可以在任一编辑器中进行更改,这些更改几乎会立即在另一个编辑器中更新。因此存在一个用于进行实时更改的协议。我猜这是通过WOPI ??。我可以使用另一种可以支持这种情况的图表方法吗?或者我是否必须构建一个完整的 WOPI 客户端和/或服务器解决方案才能做到这一点(如果可能的话,这看起来很疯狂)?

powerpoint office365 office-js microsoft-graph-api

7
推荐指数
0
解决办法
993
查看次数

如何使用 .NET 网络跟踪记录网络流量的详细信息?

我的应用程序正在使用其清单的配置设置(app.config;请参阅下面的 xml)来控制 .NET 网络跟踪(根据https://docs.microsoft.com/en-us/dotnet/framework/network-programming/network-追踪)。据我了解,这是一种“无代码”方法,它是从 app.config 文件中专门配置的,不需要实际代码来记录任何内容。在这种情况下,我以冗长的方式为一堆 System.Net 类初始化侦听器。所以我假设它会自动记录任何被调用的方法——比如从 HttpWebRequest.GetResponse() 方法捕获所有网络请求和响应(尤其包括异常)。它会自动输出到 initializeData 属性中指定的文件名。

除了我没有看到那个文件。根据下面的清单,我正在关注https://docs.microsoft.com/en-us/dotnet/framework/network-programming/how-to-configure-network-tracing 中的示例 .config 文件。要么没有记录任何内容,要么跟踪根本不起作用。我在项目的构建选项卡上选中了“定义跟踪常量”框,/bin/Debug 目录中的 MyApp.dll.config 文件是项目中主 app.config 文件的一个很好的副本。

我的假设是错误的,我必须编写代码吗?如果是这样,我从哪里获得低级网络详细信息(根据此处https://docs.microsoft.com/en-us/dotnet/framework/network-programming/interpreting-network-tracing)?我查看了一般跟踪文档(https://docs.microsoft.com/en-us/dotnet/framework/debug-trace-profile/tracing-and-instrumenting-applications)以及 TraceSource.TraceData 和 TraceSource。 TraceEvent 方法(和类似的方法)看起来很合适。但是,如何专门为 HttpWebRequest.GetResponse 实现这一点让我感到困惑。这些方法需要跟踪数据作为参数,而网络跟踪文档暗示它是自动的。

所以要么A)我的魔术日志文件在哪里,要么B)我该怎么做才能输出网络流量的跟踪?

<configuration> 
<system.diagnostics>
<trace autoflush="true" indentsize="4">
  <listeners>
    <add name="file" type="System.Diagnostics.TextWriterTraceListener" initializeData="C:\\MyApp\\bin\\Debug\\network.log"/>
  </listeners>
</trace>
<sources>
  <source name="System.Net" tracemode="protocolonly" maxdatasize="1024">
    <listeners>
      <add name="System.Net"/>
    </listeners>
  </source>
  <source name="System.Net.Cache">
    <listeners>
      <add name="System.Net"/>
    </listeners>
  </source>
  <source name="System.Net.Http">
    <listeners>
      <add name="System.Net"/>
    </listeners>
  </source>
  <source name="System.Net.Sockets">
    <listeners>
      <add name="System.Net"/>
    </listeners> …
Run Code Online (Sandbox Code Playgroud)

.net httpwebrequest

5
推荐指数
0
解决办法
330
查看次数

RequestFailedException/403 Forbidden errors accessing Azure Key Vault with role based access policies

I have a scenario where I'm getting the below exception when trying to debug an ASP.NET Core Web Application in Visual Studio that has connected services for Azure Key Vault and Azure Application Configuration resources connected to an App Service. The user that I'm signed into Visual Studio with appears to have the correct permissions on the KV and the same as another developer who does NOT get the error I do. I can also successfully view and inspect the …

azure asp.net-core

3
推荐指数
1
解决办法
8638
查看次数