2015-06-03 35 views
0

我想使用圖像Resizer的AzureReader2插件從blob存儲讀取圖像。當我嘗試檢索未編輯的圖像時,它工作正常。與MVC網站使用圖像Resizer AzureReader2「圖像無法顯示,因爲它包含錯誤」

當我去到以下網址重定向到我的本地存儲帳戶,圖像存儲

http://localhost:2000/azure/test/image.jpg 

但是,當我瀏覽到我得到「無法顯示圖像,因爲它包含錯誤」以下

http://localhost:2000/azure/test/image.jpg?width=400&height=400&mode=crop&borderWidth=10&borderColor=red 

這裏是我的web.config文件看起來像

<configuration> 
    <configSections> 
    <section name="resizer" type="ImageResizer.ResizerSection,ImageResizer" requirePermission="false" /> 
    </configSections> 
    <system.web> 
    <compilation debug="true" targetFramework="4.5" /> 
    <httpRuntime targetFramework="4.5" /> 

    <httpModules> 
     <add name="ImageResizingModule" type="ImageResizer.InterceptModule" /> 
    </httpModules> 
    </system.web> 
    <runtime> 
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
... 
    </assemblyBinding> 
    </runtime> 
    <appSettings> 
... 
    </appSettings> 
<system.webServer> 
    <validation validateIntegratedModeConfiguration="false" /> 
    <modules runAllManagedModulesForAllRequests="true"> 
     <!-- This is for IIS7/8 Integrated mode--> 
    <add name="ImageResizingModule" type="ImageResizer.InterceptModule" /> 
    </modules> 

</system.webServer> 
    <resizer> 
    <plugins> 
     <add name="MvcRoutingShim" /> 
     <add name="AzureReader2" connectionString="UseDevelopmentStorage=true" endpoint="http://127.0.0.1:10000/devstoreaccount1/" /> 
    </plugins> 
    </resizer> 
</configuration> 

任何想法?

+0

您需要使用開發工具>網絡選項卡來檢查實際的響應字節,並將其上傳到某處。 –

回答

0

這似乎是問題與我的歐文管道。我的項目其餘部分的設置方式是通過Owin路由,並且始終無法訪問Image Resizer。我改變了我的項目的設置,以便它不通過Owin路由。

相關問題