2017-03-02 4 views
0

私はASP.NET MVC WebサイトでImageResizer libraryを使用しています。私は最初のページの読み込み時間を早くするためにビューのプリコンパイルをオンにしようとしました。 (下図参照)のデバッグ出力でASP.NET MVCのビュープリコンパイルでImageResizerを使用

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. 

それは「言うImageResizerから(警告)::プリコンパイルが有効になって期待通りの画像プロバイダが動作しない場合があり、私はリサイズされた画像にアクセスしようとすると、次の404メッセージが表示されます。 "

一緒に働く方法はありますか?

トラブルシューティングガイドには、「You(a)がコマンド文字列を指定していない、(b)プリコンパイルが有効になっている、(c)画像プロバイダを使用している」などの理由でファイルが見つかりませんでした。 .NETフレームワークの長年にわたるバグだ」と語った。コマンド文字列とは何ですか?私はコマンド文字列を指定する場合、それは動作するのだろうか?もしそうなら、どうしたらいいですか?

デバッグ出力:

Image resizer diagnostic sheet  3/2/2017 3:31:20 PM 

2 Issues detected: 

(Warning): To potentially see additional errors here, perform an image resize request. 


(Warning): Precompilation is enabled. Image providers may not work as expected. 



You are using plugins from the Performance Edition: DiskCache (Performance Edition), AzureReader2Plugin (Performance Edition) 

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.DiskCache.DiskCache 
ImageResizer.Plugins.AzureReader2.AzureReader2Plugin 

Configuration: 

<resizer> 
<clientcache minutes="1440" /> 
<sizelimits imageWidth="0" imageHeight="0" totalWidth="3200" totalHeight="5000" totalBehavior="throwexception" /> 
<diagnostics enableFor="allhosts" /> 
<plugins> 
<add name="MvcRoutingShim" /> 
<add name="DiskCache" /> 
<add name="AzureReader2" connectionString="[redacted]" endpoint="[redacted]" lazyExistenceChceck="True" prefix="~/assets/" /> 
</plugins> 
</resizer> 


Accepted querystring keys: 

quality, format, thumbnail, maxwidth, maxheight, width, height, w, h, scale, stretch, crop, cropxunits, cropyunits, page, bgcolor, rotate, flip, sourceFlip, sFlip, sRotate, borderWidth, borderColor, paddingWidth, paddingColor, ignoreicc, frame, useresizingpipeline, cache, process, margin, anchor, dpi, mode, zoom, 

Accepted file extensions: 

bmp, gif, exif, png, tif, tiff, tff, jpg, jpeg, jpe, jif, jfif, jfi, 

Environment information: 

Running Microsoft-IIS/8.0 on Microsoft Windows NT 6.2.9200.0 and CLR 4.0.30319.42000 
Trust level: Unrestricted 
OS bitness: x86 !! Warning, running as 32-bit on a 64-bit OS(AMD64). This will limit ram usage !! 
Executing assembly: D:\Windows\SysWOW64\inetsrv\w3wp.exe 
IntegratedPipeline: True 

... 
... 

答えて

0

プリコンパイルは、すべてのVirtualPathProvidersを破ります。私たちは様々な緩和策を講じてきましたが、ImageResizerのバージョン番号を省略しています。

非同期HttpModuleに切り替えると、運が増える可能性があります。

type="ImageResizer.InterceptModule"/>をWeb.configのtype="ImageResizer.AsyncInterceptModule"/>に置き換えます。

+0

よろしくお願い申し上げます。Nathanael。 AsyncInterceptModuleを使用するときに気が付かなければならない問題はありますか?そのバージョン番号はどのバージョン番号で利用できますか? – Austin

+0

本当に。 4.x –

関連する問題