1
我在ASP.NET MVC 4項目中使用ImageResizer模塊以及插件SqlReader和MvcRoutingShim。MvcRoutingShim插件沒有任何作用
當我嘗試訪問的URL ~/databaseimages/123.jpg
(例如),我只是得到標準錯誤404 - The resource cannot be found.
我的期望是,ImageResizer將處理該請求,並嘗試從數據庫中讀取的圖像,但它不甚至不嘗試連接(我使用SQL Profiler來驗證這一點)。
什麼可能是錯誤的?
這是/resizer.debug的輸出:
Image resizer diagnostic sheet 26-06-2012 20:42:57
1 Issues detected:
(Warning): To potentially see additional errors here, perform an image resize request.
You are using paid bundles: Cloud Bundle, Performance Bundle
Registered plugins:
ImageResizer.Plugins.Basic.DefaultEncoder
ImageResizer.Plugins.Basic.NoCache
ImageResizer.Plugins.Basic.ClientCache
ImageResizer.Plugins.Basic.Diagnostic
ImageResizer.Plugins.Basic.SizeLimiting
ImageResizer.Plugins.MvcRoutingShim.MvcRoutingShimPlugin
ImageResizer.Plugins.SqlReader.SqlReaderPlugin
ImageResizer.Plugins.DiskCache.DiskCache
Configuration:
<resizer>
<plugins>
<add name="MvcRoutingShim" />
<add name="SqlReader" prefix="~/databaseimages/" connectionString="database" idType="UniqueIdentifier" blobQuery="SELECT Content FROM Images WHERE [email protected]" modifiedQuery="Select ModifiedDate, CreatedDate From Images WHERE [email protected]" existsQuery="Select COUNT(ImageID) From Images WHERE [email protected]" requireImageExtension="false" cacheUnmodifiedFiles="true" extensionPartOfId="false" vpp="true" untrustedData="false" />
<add name="DiskCache" />
</plugins>
</resizer>
(...)
請在你的問題/resizer.debug的內容。 –
此外,請確保您沒有在網址中使用代字號 - 這僅用於服務器端的使用情況。 –
@ComputerLinguist:我沒有使用代字符,而是:http:// localhost:50272/databaseimages/123.jpg – pvieira