Can't use an ashx in mailmerge

Hi,
I’m using an ashx to get images in a mailmerge. It is something similar to this:
…/getImg.ashx?f=picutre.jpg
It gives me an error:

Exception 'Cannot load image from field 'PictureField'. The field contains data in unsupported format. Illegal characters in path.' occured in Aspose.Words for .NET 5.2.2.0.
For free technical support, please post this error and the file in the Aspose.Words Forums <https://forum.aspose.com/c/words/8>.

If I change the route to for example “…/picture.jpg”, it works fine. And if I run getImg.ashx?f=picutre.jpg at the browser, I can see the image.
This is (reduced), what the ashx does:

context.Response.Clear();
context.Response.ClearContent();
context.Response.Cache.SetExpires(DateTime.Now.AddDays(1));
context.Response.Cache.SetSlidingExpiration(true);
context.Response.Cache.SetValidUntilExpires(true);
context.Response.Cache.VaryByParams["n"] = true;
context.Response.Cache.SetCacheability(HttpCacheability.Public);
context.Response.ContentType = "image/Jpeg";
context.Response.AddHeader("Content-Length", pict.Length.ToString());
if (context.Response.IsClientConnected)
{
   context.Response.BinaryWrite(pict);
   context.Response.Flush();
   context.Response.End();
}

¿Any idea?
Thanks

Hi

Thanks for your request. Please try using the full path; see the following code:

Document doc = new Document(@"C:\Temp\in.doc");
doc.MailMerge.Execute(new string[] { "Test" }, new string[] { "http://localhost:2295/getImg.ashx" });
doc.Save(@"C:\Temp\out.doc");

I use the latest version of Aspose.Words (9.2.0) for testing. You can download this version from here:
https://releases.aspose.com/words/net
Best regards,