Atalasoft
Welcome to Atalasoft Community Sign in | Join | Help
in

Image display issue in user controls deployed to WSS (Sharepoint)

Last post 02 Dec 2007, 1:07 AM by David Cilley. 6 replies.
Sort Posts: Previous Next
  •  17 Oct 2007, 1:55 PM 12682

    Image display issue in user controls deployed to WSS (Sharepoint)

    I am developing a project in ASP.NET that I am then deploying to WSS 3.0 (Sharepoint). All ASP.NET controls (including the Atalasoft WebThumbnailViewer and WebImageViewer) are being nested within web user controls. These user controls are then deployed to Sharepoint within a 3rd party "web parts" container utility, Smart Part.

     My development cycle is to build, test, and deploy in ASP.NET; and then migrate to Sharepoint. This has been working effectively.

    I am loading tif images from a byte array into the Atalasoft viewer controls. I have configured an image cache directory within my UserControls folder, and granted access permissions to that folder.

    In ASP.NET, the viewers read in the byte array, write it to the cache (stamp files appear), and display them.

    In Shareponit, the viewers read in the byte array, write it to the cache (stamp files appear), but no images display (blank pages in the WebThumbnailViewer--but with the correct number of pages per tif--and broken image icons in the WebImageViewer). Since the stamp files are being written to the cache, I believe this verifies my access permissions are set correctly on the image cache folder.

    Any idea why these images are not displaying?


     

  •  22 Oct 2007, 1:24 PM 12696 in reply to 12682

    Re: Image display issue in user controls deployed to WSS (Sharepoint)

    I've spent a lot more time debugging this, and unfortunately, have not been able to resolve it. However, I have more information:

    1) BOTH the ASP.NET site and the Sharepoint deployed version are correctly writing the .ukn (thumbnail) and .png (viewer) files to their ImageCache directories.

    2) The thumbnail viewer correctly determines the number of pages in the TIFF file, and shows them correctly (but blank, no image).

    3) When viewing source from the browser, BOTH show the correct relative path to their files. In ASP.NET, this is straightforward. In Sharepoint, because the virtual directory is very divergent from the actual directory, that path looks like this:

    ../../../../UserControls/ImageCache/rwc3qsmdeyk3hpr0ro4fgvjcSPSTD3_ASPX_933507721webImageViewer_si_00002.png

    4) If I try to access the png image directly in the browser, by pasting the above path and remove 4 levels of directories after the URI, the image DISPLAYS CORRECTLY in the browser (i.e. there don't seem to be any security access issues.)

    5) If this helps, I have an ASP.NET ImageButton control that has a relative path assigned directly as a property (i.e. "Gfx/myImage.GIF"); this gets correctly interpreted in Sharepoint as ../../../../UserControls/Gfx/myImage.GIF and displays the image. This leads me to think that there is something about the way that the web.config key is being interpreted, which causes it to WRITE to the directory correctly, yet somehow not READ from it correctly:

    <add key="AtalasoftWebControls_Cache" value="../../../../UserControls/ImageCache/" />

    Any help with this issue would be greatly appreciated.

    Thanks,

    David





     

  •  22 Oct 2007, 1:35 PM 12697 in reply to 12696

    Re: Image display issue in user controls deployed to WSS (Sharepoint)

    On Friday, we released DotImage 5.0e which fixed an issue that prevented the WebControls from working properly in Sharepoint.  Sorry this wasn't communicated earlier.  Sometimes the forums are great for this type of support, but for managed support from our excellent Developer Support team, consider creating a case via our support portal.


    Bill Bither
    Atalasoft
  •  22 Oct 2007, 2:04 PM 12698 in reply to 12697

    Re: Image display issue in user controls deployed to WSS (Sharepoint)

    Excellent!

    We are on day 12 remaining of our 30-day license, and will therefore shortly be purchasing DotImage licensing (we are scanning tifs in a ClickOnce-launched Win app built using DotTwain/DotImage, storing as varbinary type in SQL Server, and then viewing TIFFs/converting to Pdf etc from the Sharepoint user controls-based app.)

    This display issue was the one concern point, so I'm delighted to hear this news.
     

  •  23 Oct 2007, 7:13 PM 12700 in reply to 12698

    Re: Image display issue in user controls deployed to WSS (Sharepoint)

    I have installed the latest version of DotImage, and deployed to Sharepoint.

    Confirmed that the problem has been resolved, and all images are now displaying correctly (given the settings described above).

    Thanks!


     

  •  28 Nov 2007, 2:33 AM 12815 in reply to 12700

    Re: Image display issue in user controls deployed to WSS (Sharepoint)

    Attachment: Code sample.txt
    HI am still facing the same problem even after installing the latest verion of the DotImage application. 5.0f.

    Actually in my ase im using a pdf file stream to load the images in the thumbanil viewer. Where as the same approach is working for the Annotations viewer in my case. after enabling the atalasoft error logging in the web.config the control logged an error in the image cache folder. I have already added a case on the atalasoft portal. case number is :00013125

     Case details:

     
    Case Description


    [Section 1]: Images were not loaded in the thumbanil viewer control. Am using a pdf file stream to load the images in both thumbanil viewer and annotations viewer. But the images are loaded only in annotations viewer but not in the thumbnail viewer...

    [Section 2]: Images should have loaded in the thumbanil viewer. As the same mechanism and same code is working as an indipendent asp.net web application, it should have worked under sharepoint too. but failed to load the images/page thumbnails in the thumbnail viewer control
     
    [Section 3]: Error message logged under the image cache folder. (Using the atalasoft error logging)
    url: ImageCache/o4lvz345um0ktxq3xwl3b455_layouts_sampleApp_send_aspxwtnViewer_si_00000.ukn
    searchPatterns:
    thumbSize: {Width=120, Height=120}
    frameIndex: 0

    atalagetthumb=true&atala_id=ctl00_Contentplaceholder1_wtnViewer&atala_si=ImageCache%2fo4lvz345um0ktxq3xwl3b455_layouts_sampleApp_send_aspxwtnViewer_si_00000.ukn&atala_fi=0&atala_tw=120&atala_th=120&atala_rnd=49463169

    Unrecognized Image Type.

      at Atalasoft.Imaging.Codec.RegisteredDecoders.GetDecoder(Stream stream)
      at Atalasoft.Imaging.Codec.RegisteredDecoders.GetImageInfo(Stream stream, Int32 frameIndex)
      at Atalasoft.Imaging.Codec.RegisteredDecoders.GetImageInfo(String fileName, Int32 frameIndex)
      at Atalasoft.Imaging.WebControls.WebThumbnailViewer.c()

    Atalasoft.Imaging.Codec.ImageDecoder GetDecoder(System.IO.Stream)
    -----------------------


    Searched on the net for the solution... but did quite get it. even went through one of your blogs: http://www.atalasoft.com/cs/forums/thread/12682.aspx  but didn't quite get the solution.

     Following error was logged the event viewer:
    11/27/2007 10:22:13 PM
    Office SharePoint Server
    Error
    Publishing Cache
    5785
    N/A
    BALSA
    Unable to connect publishing custom string handler for output caching.  IIS Instance Id is '387271371', Url is 'http://serverIP:23809/_layouts/betaApplication/Send.aspx?atalaimg=spacer.gif'.

    11/27/2007 10:22:11 PM
    Office SharePoint Server
    Error
    Publishing Cache
    5785
    N/A
    BALSA
    Unable to connect publishing custom string handler for output caching.  IIS Instance Id is '387271371', Url is 'http://serverIP:23809/_layouts/betaApplication/Send.aspx?atalagetthumb=true&atala_id=ctl00_Contentplaceholder1_wtnViewer&atala_si=ImageCache/ajgzmxfdje0xqk55wtoctgmn_layouts_sampleApp_send_aspxwtnViewer_si_00001.ukn&atala_fi=0&atala_tw=120&atala_th=120&atala_rnd=8071143'.
    ****************************************************************

    Any help will be really appriciated...

  •  02 Dec 2007, 1:07 AM 12827 in reply to 12815

    Re: Image display issue in user controls deployed to WSS (Sharepoint)

    That specific error message looks like the PDF decoder is not initialized when the asynchronous requests for the thumbnails are requested.  To fix this issue, you can add the PDF Decoder to the RegisteredDecoders on the Page Init event.

    I have a suggestion that may improve your performance for this situation (Once you get the PDF loading):

    If you're loading a stream or byte array into the WebThumbnailViewer and/or the WebImageViewer, these controls will automatically cache it to disk in the format that you gave it to them, so it can bring back the pieces while it's asynchronously loading tiles or thumbnails.  (If you load the same stream in both controls, you will be caching two separate copies of the same image)

    You can improve performance a great deal by opening that stream or byte array into AtalaImages, one page at a time using the TiffFile class to encode it as a Tiff, and saving that image to the ImageCache.  Now, since you have a local copy, you can open the same image from disk with both controls.  This will also speed up the tile loading, as our Tiff decoder is optimized for regional reading, and our PDF decoder is not.


    David Cilley
    My AJAX Imaging Blog
    Atalasoft Development Team
View as RSS news feed in XML