пакет nuget, вызывающий ошибку HttpRequest.GetBufferlessInputStream - PullRequest
0 голосов
/ 16 октября 2019

У меня есть проект ASP.Net MVC, использующий сеть 461, в которую я добавил пакет nuget (который я разработал), и когда я пытаюсь выполнить вызов ajax, я получаю «Этот метод или свойство не поддерживается после HttpRequest. GetBufferlessInputStream был вызван "на сервере. Метод на стороне сервера никогда не достигает точки останова;эта ошибка вызывается внутренними компонентами ASP.Net MVC.

Пакет nuget содержит сборки net461 и netstandard2.0. Пакет изменил web.config и добавил следующие зависимые сборки:

  <dependentAssembly> 
    <assemblyIdentity name="System.ComponentModel.Annotations" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> 
    <bindingRedirect oldVersion="0.0.0.0-4.2.1.0" newVersion="4.2.1.0" /> 
  </dependentAssembly> 
  <dependentAssembly> 
    <assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> 
    <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" /> 
  </dependentAssembly> 
  <dependentAssembly> 
    <assemblyIdentity name="Polly" publicKeyToken="c8a3ffc3f8f825cc" culture="neutral" /> 
    <bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" /> 
  </dependentAssembly> 
  <dependentAssembly> 
    <assemblyIdentity name="Polly.Extensions.Http" publicKeyToken="c8a3ffc3f8f825cc" culture="neutral" /> 
    <bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> 
  </dependentAssembly> 
  <dependentAssembly> 
    <assemblyIdentity name="Microsoft.Extensions.Configuration.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" /> 
    <bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" /> 
  </dependentAssembly> 
  <dependentAssembly> 
    <assemblyIdentity name="Microsoft.Extensions.Primitives" publicKeyToken="adb9793829ddae60" culture="neutral" /> 
    <bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" /> 
  </dependentAssembly> 
  <dependentAssembly> 
    <assemblyIdentity name="Microsoft.Extensions.Configuration.Binder" publicKeyToken="adb9793829ddae60" culture="neutral" /> 
    <bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" /> 
  </dependentAssembly> 

.nuspec для пакета:

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
  <metadata>
    <id>TaxService.Client</id>
    <version>1.0.0-alpha.35</version>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>Client API for obtaining taxes.</description>
    <dependencies>
      <group targetFramework=".NETFramework4.6.1">
        <dependency id="TaxService.Common" version="1.0.0-alpha.35" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.Caching.Memory" version="2.2.0" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.Configuration" version="2.2.0" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.Configuration.Abstractions" version="2.2.0" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.Configuration.Binder" version="2.2.4" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.Configuration.EnvironmentVariables" version="2.2.4" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.Configuration.Json" version="2.2.0" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.DependencyInjection" version="2.2.0" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.Http" version="2.2.0" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.Http.Polly" version="2.2.0" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.Logging" version="2.2.0" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.Logging.Console" version="2.2.0" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.Logging.Debug" version="2.2.0" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Net.Http" version="2.2.29" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Net.Http.Headers" version="2.2.0" exclude="Build,Analyzers" />
        <dependency id="Polly" version="7.1.1" exclude="Build,Analyzers" />
        <dependency id="Polly.Extensions.Http" version="3.0.0" exclude="Build,Analyzers" />
        <dependency id="Serilog" version="2.8.0" exclude="Build,Analyzers" />
        <dependency id="Serilog.Formatting.Compact" version="1.0.0" exclude="Build,Analyzers" />
        <dependency id="Serilog.Settings.Configuration" version="3.1.0" exclude="Build,Analyzers" />
        <dependency id="Serilog.Sinks.Console" version="3.1.1" exclude="Build,Analyzers" />
      </group>
      <group targetFramework=".NETStandard2.0">
        <dependency id="TaxService.Common" version="1.0.0-alpha.35" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.Caching.Memory" version="2.2.0" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.Configuration" version="2.2.0" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.Configuration.Abstractions" version="2.2.0" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.Configuration.Binder" version="2.2.4" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.Configuration.EnvironmentVariables" version="2.2.4" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.Configuration.Json" version="2.2.0" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.DependencyInjection" version="2.2.0" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.Http" version="2.2.0" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.Http.Polly" version="2.2.0" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.Logging" version="2.2.0" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.Logging.Console" version="2.2.0" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Extensions.Logging.Debug" version="2.2.0" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Net.Http" version="2.2.29" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Net.Http.Headers" version="2.2.0" exclude="Build,Analyzers" />
        <dependency id="Polly" version="7.1.1" exclude="Build,Analyzers" />
        <dependency id="Polly.Extensions.Http" version="3.0.0" exclude="Build,Analyzers" />
        <dependency id="Serilog" version="2.8.0" exclude="Build,Analyzers" />
        <dependency id="Serilog.Formatting.Compact" version="1.0.0" exclude="Build,Analyzers" />
        <dependency id="Serilog.Settings.Configuration" version="3.1.0" exclude="Build,Analyzers" />
        <dependency id="Serilog.Sinks.Console" version="3.1.1" exclude="Build,Analyzers" />
      </group>
    </dependencies>
  </metadata>
</package>

Я считаю,System.Buffers виновник, но я не уверен на 100%. Я новичок в нестандартных и многоцелевых пакетах nuget и не могу найти ничего похожего в Google. Мысли о разрешении этой ошибки?

...