小编Jer*_*Liu的帖子

程序'[1684] dotnet.exe'已退出,代码为-2147450750(0x80008082)

尝试在本地调试Azure功能.NET STANDARD 2.0.使用Visual Studio 2017 CE.昨天工作的东西想知道出了什么问题.卸载所有NET CORE SDK并放回2.1.201.找到关于Core 1.1的其他解决方案,但没有运气.调试时,控制台立即关闭,只留下此错误消息

The program '[1684] dotnet.exe' has exited with code -2147450750 (0x80008082).
Run Code Online (Sandbox Code Playgroud)

azure azure-functions visual-studio-2017 asp.net-core-2.0

11
推荐指数
1
解决办法
5762
查看次数

Azure Function应用-发布失败

我无法发布(WebDeploy)我的Azure Function应用程序(这是一个耐用的功能,我知道这无关紧要,但是以防万一)。今天开始发生这种情况。

我的Visual Studio的输出窗口中出现“发布失败”弹出窗口和以下错误消息。

错误信息

<ProjectName> -> C:\search\source\<Solution Folder>\obj\Release\netstandard2.0\PubTmp\Out\
C:\Program Files\dotnet\sdk\2.1.202\Sdks\Microsoft.NET.Sdk.Publish\build\netstandard1.0\PublishTargets\Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,5): error : Web deployment task failed. (Could not connect to the remote computer ("<functionappname>.scm.azurewebsites.net"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.) [<projectname>.csproj]
C:\Program Files\dotnet\sdk\2.1.202\Sdks\Microsoft.NET.Sdk.Publish\build\netstandard1.0\PublishTargets\Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,5): error : The requested resource does not exist, or the requested URL is incorrect. [<projectname>.csproj]
C:\Program Files\dotnet\sdk\2.1.202\Sdks\Microsoft.NET.Sdk.Publish\build\netstandard1.0\PublishTargets\Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,5): error : Error details: [<projectname>.csproj]
C:\Program Files\dotnet\sdk\2.1.202\Sdks\Microsoft.NET.Sdk.Publish\build\netstandard1.0\PublishTargets\Microsoft.NET.Sdk.Publish.MSDeploy.targets(139,5): error : Could …
Run Code Online (Sandbox Code Playgroud)

azure webdeploy azure-functions

9
推荐指数
3
解决办法
8012
查看次数

限制目标用户访问托管在 azure 存储上的静态网站

我使用静态网站功能在 Azure 存储中托管了一个简单的网站。该网站的网址现已公开。(任何拥有 url 的人都可以访问该网站)。但我的目的是只为我想要的用户提供访问权限。有没有办法限制对 Azure 存储中托管的静态网站的公共访问?

authentication azure azure-storage azure-storage-blobs

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

在本地运行Azure功能(V2)时抛出Newtonsoft.Json.JsonReaderException

我在VS2017中创建了Azure功能v2的队列触发器模板.当我在本地运行项目时,函数运行时已成功启动.但是当我在队列中创建一条消息时,VS下载了一个JsonSerialization.cs文件并指出了错误. 在此输入图像描述

默认异常设置的详细信息: 在此输入图像描述

它是由VS生成的模板,因此似乎没有像我在其他帖子中找到的代码问题.

我尝试过的:

  • 将项目发布到Azure,有效.
  • 使用npm安装的功能核心工具(Cli)运行项目,也可以.

我猜这个问题与VS使用的函数Cli有关.但它的运行时版本2.0.11651.0与npm安装的版本相同.

有没有人见过这个或有任何想法?提前致谢.

azure azure-functions azure-functions-core-tools

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

删除Visual Studio发布的Azure功能

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

azure azure-functions azure-functions-runtime

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

阻止 Azure 函数记录“正在执行”和“已执行”消息

当我的 Azure 函数被触发时,它会记录“Executing”和“Executed”消息。这在测试期间很好,但由于此函数被多次触发,它会创建大量不需要的日志消息。我自己添加的日志对我很重要,但我想禁用函数自己的“正在执行”和“已执行”消息。澄清一下,我不想记录以下消息:

Executing ‘MyFunctionName’ (Reason='New ServiceBus message detected……etc’)

Executed ‘MyFunctionName’ (Succeeded, Id=a99c6932-788f-439e-a7db-aad7f607d5ea)
Run Code Online (Sandbox Code Playgroud)

azure azure-functions asp.net-core-2.0

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

Azure 函数的 local.appsettings.json 中的 IsEncrypted 是什么意思?

Azure 函数的 local.settings.json 文件是在将 IsEncrypted 属性设置为 false 的情况下创建的。

{
   "IsEncrypted":false,
   "Values" : {
   }
}
Run Code Online (Sandbox Code Playgroud)

这个设置是什么意思,它是如何使用的?

azure asp.net-core azure-functions

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

调试 Azure Function - 未找到 VoidMethodInvoker.cs

在此输入图像描述

每当我尝试在 VS2017 中调试 azure 函数时,我都会收到此消息,但我不明白为什么。

任何意见或帮助表示赞赏。

它似乎正在寻找某种天蓝色的网络作业库:

在此输入图像描述

azure azure-functions

6
推荐指数
1
解决办法
5113
查看次数

我可以如何向Azure函数提供设置文件?

将使用设置文件的应用程序移植到Azure函数时,是否有必要消除对文件的依赖?

我想编写一个功能应用程序,以将数据从Xero导入到Azure sql数据库中。我正在使用的Xero SDK需要一个appsettings.json文件。

因此,当函数运行时,我得到了错误

System.Private.CoreLib: Exception while executing function:
FunctionXeroSync. Xero.Api: The type initializer for 
'Xero.Api.Infrastructure.Applications.Private.Core' threw an exception. 
Microsoft.Extensions.Configuration.FileExtensions: The configuration file 
'appsettings.json' was not found and is not optional. The physical path is 
'C:\Users\kirst\AppData\Local\AzureFunctionsTools\Releases\2.6.0\cli\appsettings.json'.
Run Code Online (Sandbox Code Playgroud)

我尝试通过VS2017 Project Publish选项卡上的Manage Application Settings链接将相关设置放入。显然,这失败了。我还有其他方法可以使用吗?

这是api中的相关代码。我希望不必修改它,以便可以使用官方的nuget包。

namespace Xero.Api
{
    public class XeroApiSettings : IXeroApiSettings
    {
        public IConfigurationSection ApiSettings { get; set; }

        public XeroApiSettings(string settingspath)
        {

            var builder = new ConfigurationBuilder()
                .AddJsonFile(settingspath)
                .Build();

            ApiSettings = builder.GetSection("XeroApi");
        }
        public XeroApiSettings() : this("appsettings.json")
        {
        } …
Run Code Online (Sandbox Code Playgroud)

c# azure xero-api azure-functions

6
推荐指数
1
解决办法
814
查看次数

使用环境变量配置Azure功能的LogLevel

根据Azure文档,Functions V2使用.NET Core日志记录筛选器层次结构进行配置。

在下面的示例中,将ILogger的实例注入到该函数的Run方法中。

[FunctionName("MyFunction")]
public static void Run([TimerTrigger("0 */1 * * * *")]TimerInfo myTimer, ILogger logger, ExecutionContext executionContext)
{
    logger.LogInformation("I don't want to see this in production!"));
}
Run Code Online (Sandbox Code Playgroud)

检查ILogger对象时,每个LoggerInformation元素的MinLevel为null,这似乎记录了所有级别。

在生产中,我只想以错误级别登录。我希望能够使用环境变量进行配置,但是找不到任何说明如何实现此目的的文档。我尝试添加以下环境变量无效:

"logging__logLevel__Default: "Error" 
Run Code Online (Sandbox Code Playgroud)

azure asp.net-core azure-functions

6
推荐指数
3
解决办法
1246
查看次数