How to upgrade a site to dynimg - new dynamic image

0 comments

upgrade these files from codelib:


BewebCore/Beweb/Debug.cs
BewebCore/Beweb/Error.cs
BewebCore/Beweb/Html.cs
BewebCore/Beweb/ImageProcessing.cs

BewebCore/Beweb/DynImg.cs (add this, include in project)

Controllers/ErrorController.cs
Controllers/ImagesController.cs


Add  to web.config (in  <system.webServer>)

<httpErrors errorMode="Custom">
<remove statusCode='404' subStatusCode='0'/>
<error statusCode='404' subStatusCode='0' prefixLanguageFilePath='' path='/HondaPortal/Error/Catch404' responseMode='ExecuteURL'/>
</httpErrors>


Note that this /HondaPortal/ bit is the name of the virtual, so you need to remove that for a non virtual live, or stg site with a different named virtual. On live would read:



<httpErrors errorMode="Custom">
<remove statusCode='404' subStatusCode='0'/>
<error statusCode='404' subStatusCode='0' prefixLanguageFilePath='' path='/Error/Catch404' responseMode='ExecuteURL'/>
</httpErrors>



in Web_AppSettings.config add the values

<add key="BypassDynamicImage" value="false"/><!-- turn off dynimage totally: default is false -->
<add key="UseNewDynamicImage" value="true"/><!-- default is false -->
<add key="DynImgWhitelistRemotePaths" value=""/>
<add key="RedirectToRemoteAttachmentIfAvailableDEV" value="true"/><!-- default is false -->
<add key="RedirectToRemoteAttachmentIfAvailableSTG" value="false"/><!-- default is false -->


Test, you should see images change to http://localhost/HondaPortal/dynimg/~/attachments/svy2560x2560t0x0/customerlocationmapping/di_crop___260x260/customerlocationmapping.jpg format


If it doesnt work, load this image in a new tab, it should show an error. Also, check the http headers in the response for notes/errors.


Check in to SVN, exclude new dynimg folder/


Comments


Leave a Comment