2017-03-02 1 views
0

ASP.NET MVC 웹 사이트에서 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 메시지가 표시됩니다. "

함께 작업 할 수있는 방법이 있습니까?

문제 해결 가이드에 "사용자가 (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 –

관련 문제