How to C#: HTML5 Viewer
DNN (Dotnetnuke)
DNN (Dotnetnuke)
  |  
Home ›› XDoc.HTML5 Viewer ›› C# Viewer: On DNN (Dotnetnuke)

C# HTML5 Viewer: Deployment on DotNetNuke Site


How to deploy RasterEdge XDoc. HTML5 Viewer for C#.NET on DotNetNuke Site




Deploy DotNetNuke Site through WebMatrix



Open Web Matrix, click “New” and select “App Gallery”.


Select “DNN Platform” in App Frameworks, and enter a Site Name.


Install DNN Platform and open it.


Project default physical path: C:\Users\server\Documents\My Web Sites\DNNHtml5Viewer




Integrate HTML5 Viewer to DNN Site



Find DNN Site folder (DNNHtml5Viewer), integrate related RasterEdge Html5Viewer content to it. (All resources are located in RasterEdge.DocImagSDK/DemoProjects/Xdoc.HTML5 Viewer Demo)


Open Bin folder in the package, copy corresponding dll files listed below to DNNHtml5Viewer/bin:


  RasterEdge.Imaging.Annotation.dll


  RasterEdge.Imaging.Basic.Codec.dll


  RasterEdge.Imaging.Basic.dll


  RasterEdge.Imaging.DICOM.dll


  RasterEdge.Imaging.Drawing.dll


  RasterEdge.Imaging.Font.dll


  RasterEdge.Imaging.JBIG2.dll


  RasterEdge.Imaging.JPEG2000.dll


  RasterEdge.Imaging.Processing.dll


  RasterEdge.Imaging.SVG.dll


  RasterEdge.XDoc.Converter.dll


  RasterEdge.XDoc.Excel.dll


  RasterEdge.XDoc.HTML5Viewer.dll


  RasterEdge.XDoc.Office.Inner.Common.dll


  RasterEdge.XDoc.Office.Inner.Office03.dll


  RasterEdge.XDoc.PDF.dll


  RasterEdge.XDoc.PDF.HTML5Editor.dll


  RasterEdge.XDoc.PowerPoint.dll


  RasterEdge.XDoc.TIFF.dll


  RasterEdge.XDoc.Word.dll


  RasterEdge.XImage.AdvancedCleanup.Core.dll


  RasterEdge.XImage.OCR.dll


  RasterEdge.XImage.OCR.Tesseract.dll


  RasterEdge.XImage.Raster.Core.dll


  RasterEdge.XImage.Raster.dll


  RasterEdge.XImage.BarcodeCreator.dll ( add as you need)


  RasterEdge.XImage.BarcodeScanner.dll ( add as you need)


Replace Default.aspx and Default.aspx.cs in DNN Site project with files copied from package.


Copy following file and folders to DNN Site project:


  RasterEdge_Cache


  RasterEdge_Demo_Docs


  RasterEdge_Resource_Files


  Log.txt


  Source (located in SDK package directory)


Modify Web.Config file.


  Set maxJsonLength. If the .NET framework is 2.0, add content of both node <ConfigSections> and <system.web.extensions> to <configuration>. If project runs in .NET framework 4.0, only put <system.web.extensions> into <configuration>. Otherwise you’ll get config error: duplicate scriptResourceHandler defined.




    <configSections>
        <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=31BF3856AD364E35">
            <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
                <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
                </sectionGroup>
            </sectionGroup>
        </sectionGroup>
    </configSections>





    <system.web.extensions>
        <scripting>
            <webServices>
                <jsonSerialization maxJsonLength="50000000">
                </jsonSerialization>
            </webServices>
        </scripting>
    </system.web.extensions>




  Add following two nodes into <appSettings>, values correspond to the names of cache file and resource folder mentioned above.




    <appSettings>
        <add key="cacheFolder" value="RasterEdge_Cache"/>
        <add key="resourceFolder" value="RasterEdge_Resource_Files"/>
    </appSettings>




  Add following content into <webServer>.




        <staticContent>
            <remove fileExtension=".js"/>
            <remove fileExtension=".svg"/>
            <remove fileExtension=".woff"/>
            <mimeMap fileExtension=".woff" mimeType="application/x-font-woff"/>
            <mimeMap fileExtension=".svg" mimeType="image/svg+xml"/>
            <mimeMap fileExtension=".ttc" mimeType="application/x-font-ttc"/>
            <mimeMap fileExtension=".js" mimeType="application/x-javascript"/>
        </staticContent>




Set Website: Click Site->Settings, set website running port and .NET Framework Version





Website run as follow: