reporting services - System.Byte[] gives unexpected value -


i have strange issue in 1 of production servers. have architecture in have integrated ax using web services .net app. use system.io objects convert pdf report bytes , send info through web services app. method use worked fine until when started seeing strange results. byte array returned on production environment different rest of environments. code base same on environments. byte array had large number, 47000 , rest of environments give approx 3000. causes issues generating report in app.

just add above, report in question ax ssrs report of item , barcode. report prints fine in ax client. pass web services report converted bytes , sent app converts image , displays on ui. because of difference in bytes returned on production, image thats printed has item number not barcode. instead of barcode, shows blank white space. have checked barcode fonts installed on ssrs server , if print report directly in ax, prints fine. know architecture have been simpler thats have @ moment , need make work. appreciated. thanks.

static system.byte[] test() {     str _filepath = "c:\\users\\harry\\desktop\\abc.pdf";      system.byte[]           pdfbuffer;     system.io.fileinfo      fileinfo;     system.io.filestream    fs;     int                     size;     set                     permissionset = new set(types::class);      permissionset.add(new fileiopermission(_filepath,'r'));     permissionset.add(new interoppermission(interopkind::clrinterop));      codeaccesspermission::assertmultiple(permissionset);      //load file     fileinfo = new system.io.fileinfo(_filepath);     //initiallize byte array setting length of file     size = int642int(fileinfo.get_length());     pdfbuffer = new system.byte[size]();     // stream file     fs = new system.io.filestream(fileinfo.get_fullname(), system.io.filemode::open, system.io.fileaccess::read);     fs.read(pdfbuffer, 0, pdfbuffer.get_length());     fs.close();     fs.dispose();      //revert access     codeaccesspermission::revertassert();      return pdfbuffer;     } 

solution install barcode fonts on reporting server , restart server. had delayed restarting server. find font need, generate ssrs report in ax client , export pdf. adobe reader can check properties of report , see barcode required on fonts tab. thats font.


Comments