小编Shi*_*uel的帖子

删除Visual Studio发布的Azure功能

我通过visual studio发布了Azure Function.现在,我想删除已发布的Azure功能,并禁用要删除的按钮.有没有办法删除从VS发布的azure函数?

azure azure-functions azure-functions-runtime

8
推荐指数
1
解决办法
2681
查看次数

Azure AAD - 受众群体无效

我创建了一个用azure活动目录保护的webapi.我现在需要测试它并尝试使用带有授权标头的fiddler.我正在尝试使用以下代码生成令牌.

Target obj = (Target)cmbTarget.SelectedItem;

AuthenticationResult authenticationResult;
string aadInstance = obj.AADInstance; // "https://login.windows.net/{0}";
string tenant = obj.Tenant; //"rudderless.onmicrosoft.com";
string apiResourceId = obj.ApiResourceId; //"15b4ac7f-23a8-4958-96a5-64159254690d";
string clientId = obj.ClientId; // "47cdc6c3-226a-4c38-b08e-055be8409056";

Uri redirectUri = new Uri(obj.RedirectUri); //new Uri("http://nativeclient");
string authority = string.Format(aadInstance, tenant);
authContext = new AuthenticationContext(authority);

authenticationResult = this.authContext.AcquireToken(apiResourceId, 
                            clientId, redirectUri, PromptBehavior.Always);

txtToken.Text = authenticationResult.AccessToken;
Clipboard.SetText($"Bearer {txtToken.Text}");
Run Code Online (Sandbox Code Playgroud)

我成功生成了令牌,当我使用令牌调用webapi时,它会抛出401消息

WWW-Authenticate:Bearer error ="invalid_token",error_description ="观众无效"

active-directory azure asp.net-web-api azure-active-directory asp.net-core-webapi

6
推荐指数
5
解决办法
9818
查看次数

如何判断 Azure AD 客户端机密何时过期?

我在 Azure AD 租户中注册了许多应用程序,其中许多应用程序都发布了 1 或 2 年的客户端密钥。有没有办法在到期前收到警报,因为过期的密钥会导致中断。

azure azure-active-directory

5
推荐指数
2
解决办法
7374
查看次数

Azure AD SPN 和 UPN?

我想了解 Azure AD 上下文中 SPN 和 UPN 之间的区别。我的理解是在 Azure AD 中可以通过三种方式建立身份

  1. 用户输入他们的用户名和密码来建立身份
  2. 使用 ClientId 和 Secret Key 建立身份的应用程序
  3. 使用 ClientId 和 Certificate 建立身份的应用程序

用户/密码是否称为UPN,其余两个称为SPN?还有其他方法可以建立身份吗?

azure azure-active-directory

4
推荐指数
1
解决办法
8213
查看次数

VS2015中的SSIS包

在Visual Studio 2015中开发SSIS ETL软件包需要什么。我已经安装了SSDT。我仍然无法在Visual Studio 2015的新项目菜单中看到Integration Services项目。

ssis visual-studio-2015

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

CryptographicException:拒绝访问 - 如何在用户存储上提供访问权限?

我试图从WPF应用程序中的pfx文件加载证书,它给我一个访问被拒绝错误.

using (FileStream stream = System.IO.File.OpenRead(certificatePath))
{
    using (BinaryReader reader = new BinaryReader(stream))
    {
        buffer = reader.ReadBytes((int)stream.Length);
    }
}

X509Certificate2 certificate = new X509Certificate2(buffer, password);
Run Code Online (Sandbox Code Playgroud)

System.Security.Cryptography.CryptographicException:拒绝访问.
在System.Security.Cryptography.CryptographicException.ThrowCryptographicException(的Int32小时)在System.Security.Cryptography.X509Certificates.X509Utils._LoadCertFromBlob(字节[] RAWDATA,IntPtr的密码,UInt32的dwFlags中,布尔persistKeySet,SafeCertContextHandle&pCe​​rtCtx)在System.Security.Cryptography位于HelloWorld.HelloClient.Models.Infrastructure.ReadCertificateFromPfxFile的System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(Byte [] rawData,String password)的.X509Certificates.X509Certificate.LoadCertificateFromBlob(Byte [] rawData,Object password,X509KeyStorageFlags keyStorageFlags) (String certificatePath,String password)

代码段中的最后一行导致异常,如果我以管理员身份运行它就可以了.问题似乎是X509Certificate2的默认构造函数尝试将私钥放在用户存储中.我没有使用Web应用程序.这篇文章没有解决我的问题.我认为当前用户可能无法访问自己的私钥库.但是我怎么能提供这种访问权限?

c# windows security wpf

2
推荐指数
2
解决办法
7356
查看次数

在 VSCode 中使用多个命令的快捷方式

我有一个现有的快捷方式,可以最大化终端窗口,

{
        "key": "ctrl+`",
        "command": "workbench.action.toggleMaximizedPanel"
}
Run Code Online (Sandbox Code Playgroud)

我想在快捷方式中添加一个附加命令,以便在最大化时将焦点转移到终端窗口,并在最小化时将焦点移回编辑器窗口。这在 vscode 中可能吗?

visual-studio-code

2
推荐指数
1
解决办法
1467
查看次数

PowerShell 解析 JSON

我正在尝试通过 PowerShell 解析此 JSON 内容:

gc .\release.json |  ConvertFrom-Json
Run Code Online (Sandbox Code Playgroud)

release.json将有类似的内容如下:

{
  "source": 2,
  "id": 3487,
  "environments": [
    {
      "id": 11985,
      "variables": {
        "Var1": { "value": "val1" },
        "Var2": { "value": "val2" },
        "var3": { "value": "val3" }
      }
    },
    {
      "id": 13797,
      "variables": {
        "Var1": { "value": "val1" },
        "Var2": { "value": "val2" },
        "var3": { "value": "val3" },
        "var4": { "value": "val4" }
      }
    }
  ]
}
Run Code Online (Sandbox Code Playgroud)

为了获得如下所示的输出,我可以在每个环境中拥有许多变量,并且可以拥有多个环境。最终我需要将其导入 Excel 并进行分析。

在此输入图像描述

powershell json

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