Free Support Forum -

Images from database not showing with insertHtml

We use CuteEditor to allow users to insert limited html tags in text along with tables and images. We then use inserthtml to insert this clob of text into doc created using Aspose. We do use a template so the reference should be set. The document works fine on local development machine but the images don't show on development server running IIS. The images appear as the red x. The html for the image in the clob field points to a file that downloads the image from a database (ex: src="http://Site/Folder/DownFile.Aspx?fileid=2"). I have used builder.Write to check text and the location to the file is correct and if I copy the src for the image from the text being written above and paste it in the address of IE, the image shows fine.

I have placed the following code to test inserting image from file structure (works fine):

Dim baseUri As String = ""
builder.InsertHtml(baseUri + "")

I use the same code when inserting the clob text that contains the images:

Dim baseUriDeclaration As String = ""
builder.InsertHtml(baseUriDeclaration + clb_text)

I feel it is a permissions issue but not sure where. I get no exceptions and nothing is written to any logs.
Any help would be appreciated.


<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. I cannot reproduce the problem using the latest version of Aspose.Words (7.0.0). I use this code for testing:

string baseUri = "";

builder.InsertHtml(baseUri + "");

Best regards,

Thanks for the reply but I can also get the image to show using your code. The problem I'm having is when the image is in a database and not in the file structure. When I get the text from the clob field of the database it may look like this:

Just some samplt text

This works fine on my localhost development machine but not on the development server running IIS, I get the text and the red cross for the image.


<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. The problem can occur because Aspose.Words cannot access these pictures. Most likely, you should have authorized access to the site where these pictures are located.

Best regards,

The issues you have found earlier (filed as WORDSNET-927) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.