2016-03-15 3 views
0

ImageResizer настроен и работает в нашей среде тестирования и разработки, однако мы не можем заставить его работать в нашей производственной среде. Я установил сайт IIS одинаково (за исключением имени и т. Д.) И имею те же параметры Web.config (только связанные с ImageResizer вещи) .... и никаких кубиков. Мы продолжаем получать ошибку ниже. Мы уже попробовали повторную загрузку файлов, и мы проверили другие предложения. Все безрезультатно.Не удалось загрузить тип ImageResizer.InterceptModule

.NET Version 4.5.2.

dll version 4.0.4.934 (мы также пробовали с 4.0.5) ... тот же результат.

В самой нижней части страницы с ошибкой отображаются следующие дисплеи ... которые могут объяснить ситуацию? .NET 4.5.2 находится на сервере, но похоже, что сайт не настроен на его использование, возможно:

Информация о версии: Microsoft .NET Framework Версия: 4.0.30319; ASP.NET версии: 4.0.30319.34274

Server Error in '/' Application.

Could not load type 'ImageResizer.InterceptModule'.

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.Web.HttpException: Could not load type 'ImageResizer.InterceptModule'.

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:

[HttpException (0x80004005): Could not load type 'ImageResizer.InterceptModule'.] System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +12512121 System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +76

[ConfigurationErrorsException: Could not load type 'ImageResizer.InterceptModule'.] System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +12425644 System.Web.Configuration.Common.ModulesEntry.SecureGetType(String typeName, String propertyName, ConfigurationElement configElement) +69 System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement) +62 System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +299 System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +1262 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +133 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475

[HttpException (0x80004005): Could not load type 'ImageResizer.InterceptModule'.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12618980 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12458597

web.config

<?xml version="1.0" encoding="utf-8"?> 
<configuration> 
    <configSections> 
     <section name="resizer" type="ImageResizer.ResizerSection,ImageResizer" requirePermission="false" /> 
    </configSections> 
    <resizer> 
     <!-- Unless you (a) use Integrated mode, or (b) map all requests to ASP.NET, 
     you'll need to add .ashx to your image URLs: image.jpg.ashx?width=200&height=20 --> 
     <pipeline fakeExtensions=".ashx" defaultCommands="autorotate.default=true" /> 
     <diskcache dir="/cache" /> 
     <plugins> 
      <add name="DiskCache" /> 
      <!-- <add name="PrettyGifs" /> --> 
      <!-- <add name="SimpleFilters" /> --> 
      <!-- <add name="S3Reader" /> --> 
     </plugins> 
    </resizer> 
    <system.web> 
     <httpModules> 
      <!-- This is for IIS7/8 Classic Mode and Cassini--> 
      <add name="ImageResizingModule" type="ImageResizer.InterceptModule" /> 
     </httpModules> 
    </system.web> 
    <system.webServer> 
     <validation validateIntegratedModeConfiguration="false" /> 
     <modules> 
      <!-- This is for IIS7/8 Integrated mode --> 
      <add name="ImageResizingModule" type="ImageResizer.InterceptModule" /> 
     </modules> 
    </system.webServer> 
</configuration> 

информация Дополнительная ошибка ...

Could not load file or assembly 'ImageResizer' or one of its dependencies. The system cannot find the file specified.

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.IO.FileNotFoundException: Could not load file or assembly 'ImageResizer' or one of its dependencies. The system cannot find the file specified.

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.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'ImageResizer' could not be loaded.

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

+0

Какая версия .NET включена для сайта ASP.NET? –

+0

Также покажите связанный элемент web.config. Вы указали имя сборки? –

+0

Сообщение обновлено с .Net-версией и Web.config. –

ответ

0

Даже если наша тестовая среда имеет "корзины" папка в качестве виртуального каталога в IIS, это не сработало в нашей производственной среде. Скорее всего, это связано с тем, как диски и корни сайта и контент настраиваются и сохраняются.

Test VM:

IIS сайта Root -> X: \ some.site \ WWWW "бен" виртуальный каталог -> Y: \ бен

Prod ВМ:

Не работает :

IIS сайта Root -> X: \ some.site \ WWWW (который является символической ссылкой на долю SAN) "бен" виртуальный каталог -> C: \ бин

работ:

«бин» является каталогом в корневом каталоге сайта (на долю SAN)

Спасибо Нафанаил за помощь.

Смежные вопросы