c# - Magick.NET-Q16-AnyCPU and iis server -
i have issue:
1) i've downloaded magick.net-q16-anycpu throught nuget in vs2010. 2) i've created function read remote svg , convert itextsharp.text.image object below:
itextsharp.text.image headeimage = null; using (magickimage image= new magickimage(linksvgremote)) { percentage percent = new percentage(55); image.resize(percent); headeimage = itextsharp.text.image.getinstance(image.tobytearray(magickformat.png)); }
javascript function is:
apridialogcaricamento(); var datiinput = {}; datiinput.idtipo = idtipo; datiinput.clearengine = clearengine; datiinput.nomefilesvg = numfile; var jsondata = json.stringify(datiinput); var xhr = new xmlhttprequest(); xhr.onreadystatechange = function () { if (this.readystate == 4 && this.status == 200) { chiudidialogcaricamento(); var url = window.url || window.webkiturl; window.open(url.createobjecturl(this.response)); } } xhr.open('post', 'handlers/generadatitecnicipdf.ashx'); xhr.responsetype = 'blob'; xhr.setrequestheader('content-type', 'application/pdf'); xhr.send(jsondata);
it's work fine local when have uploaded on iis server javascript function return string:
failed load resource server responded status of 500 (internal server error)
it's problem in function descripted above.... know because if comment it works not generate svg-converted-image .
how can resolve on server?
thanks
mike
you getting exception because don't have write permissions directory used store embedded dll. depending on platform run magick.net on write x86 or x64 dll temporary directory. location of directory magickanycpu.cachedirectory
setting property folder application can write resolve issue.
Comments
Post a Comment