2015-09-27 63 views
0

每当我尝试访问“resizer.debug”或“resizer.debug.ashx”时,都会得到一个“Sequence contains no matching element”错误。我正在使用pre-release 4.0.0。它在3.4.3中运行正常。ImageResizer调试“序列不包含匹配元素”

我在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> 

而且,这里是从错误页面中的文本......

Server Error in '/' Application.

Sequence contains no matching element

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Sequence contains no matching element

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidOperationException: Sequence contains no matching element] System.Linq.Enumerable.First(IEnumerable 1 source, Func 2 predicate) +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& completedSynchronously) +69

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

回答

0

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

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

+0

https://www.myget.org/F/imazen-nightlies/不能在我的NuGet包管理器中工作。 –

+0

你能否详细说明一下? –

+0

我将链接添加到我的NuGet存储库;但搜索它不会返回任何结果。老实说,我可能只是不知道如何使用它。 –

相关问题