ImageResizer Debug" Sequence不包含匹配元素"

时间:2015-09-27 23:21:48

标签: asp.net .net imageresizer

每当我尝试访问" resizer.debug"或" resizer.debug.ashx",我得到一个"序列不包含匹配元素"错误。我正在使用4.0.0之前的版本。它在3.4.3中运行良好。

我在ImageResizer网站上发布了这个问题,我被要求将其移到这里,并附上我的web.config副本。所以,我来了!

这是我的web.config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="resizer" type="ImageResizer.ResizerSection" requirePermission="false" />
  </configSections>





  <!--
    For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.

    The following attributes can be set on the <httpRuntime> tag.
      <system.Web>
        <httpRuntime targetFramework="4.5" />
      </system.Web>
  -->
  <connectionStrings>
    <add name="vsproductsConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\acessdb.mdb" providerName="System.Data.OleDb" />
  </connectionStrings>
  <appSettings>
    <add key="leftNavSearchCriteriaGroupIds" value="3,4,1" />
    <add key="productNameSearchCriteriaGroupIds" value="3,4,1" />
  </appSettings>
  <system.web>
    <compilation targetFramework="4.5" defaultLanguage="c#" debug="true" />
    <pages controlRenderingCompatibilityVersion="4.0">
    </pages>
    <customErrors mode="Off">
    </customErrors>
    <trust level="Full" />




    <httpModules>
      <add name="ImageResizingModule" type="ImageResizer.InterceptModule" />
    </httpModules>
  </system.web>
  <system.webServer>
    <defaultDocument>
      <files>
        <clear />
        <add value="default.aspx" />
        <add value="default.asp" />
      </files>
    </defaultDocument>
    <handlers>
      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
      <remove name="OPTIONSVerbHandler" />
      <remove name="TRACEVerbHandler" />
      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
    </handlers>
    <rewrite>
      <!--<allowedServerVariables>
        <add name="ORIGINAL_URI" />
        <add name="RULE_ID" />
      </allowedServerVariables>-->
      <rules>
        <rule name="Section" stopProcessing="true">
          <match url="^products/([^/]*)(/*)$" />
          <conditions>
            <add matchType="IsDirectory" negate="true" ignoreCase="true" />
          </conditions>
          <action type="Rewrite" url="products.aspx?sn={R:1}" appendQueryString="true" />
          <!--<serverVariables>
            <set name="HEADER_ORIGINAL_URI" value="{REQUEST_URI}" />
          </serverVariables>-->
        </rule>
      </rules>
    </rewrite>


    <validation validateIntegratedModeConfiguration="false" />
    <modules>
      <add name="ImageResizingModule" type="ImageResizer.InterceptModule" />
    </modules>
  </system.webServer>

  <resizer>

    <pipeline fakeExtensions=".ashx" defaultCommands="autorotate.default=true"/>
    <diagnostics enableFor="localhost" />
    <plugins>
      <!--<add name="PdfRenderer" downloadNativeDependencies="true" />-->
      <add name="PdfiumRenderer" downloadNativeDependencies="true"/>
    </plugins>
  </resizer>
</configuration>

此外,这是错误页面中的文字......

  

&#39; /&#39;中的服务器错误应用

     

序列不包含匹配元素

     

描述:执行当前Web请求期间发生了未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。

     

异常详细信息:System.InvalidOperationException:Sequence不包含匹配元素

     

来源错误:

     

在执行当前Web请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常的起源和位置的信息。

     

堆栈追踪:

     

[InvalidOperationException:Sequence不包含匹配元素]      System.Linq.Enumerable.First(IEnumerable 1 source, Func 2谓词)+276      ImageResizer.Plugins.Basic.DiagnosticPageHandler.GenerateOutput(HttpContext context,Config c)+2730      ImageResizer.Plugins.Basic.DiagnosticPageHandler.ProcessRequest(HttpContext context)+138      System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()+188      System.Web.HttpApplication.ExecuteStep(IExecutionStep step,Boolean&amp; completedSynchronously)+69

版本信息:Microsoft .NET Framework版本:4.0.30319; ASP.NET版本:4.6.79.0

1 个答案:

答案 0 :(得分:0)

我们已在4.0.0.901 zip修复此错误。当您没有安装任何标准插件(如DiskCache)时,就会发生这种情况。

查看我们的nuget feed以获取最新版本的软件包。

相关问题