I seem to be having trouble using this in a web service, .ashx.cs file. I'm using the trial version for evaluation right now.
I'm trying to write a stream to a DTI.ImageManSeekableReadOnlyStream, but it keeps giving me an error:
MemoryStream theMemStream = new MemoryStream();
theMemStream.Write(uploadBytes, 0, uploadBytes.Length);
DTI.ImageMan.SeekableReadOnlyStream imgstream = new SeekableReadOnlyStream(theMemStream);
It's the last line that it always has problems with. Even if I try to get it from a file, I'll get a bad response from the web service. On a command line app this works ok though. I think I'm missing something very basic. I'm using a raduploadHandler by telerik.
What is the error you are getting ?
Data Techniques Inc Support
I can't seem to catch the error message. I put it in a try catch and try to write the error to a file, but the Telerik RadUploadHandler just fails. But the above code looks ok to put in a web service. I'll try to find a way to get the error message then
is there any chance you could send us the solution or a sample and we can have a look at it ?
Sorry, I just didn't copy the Imageman DDLs to the server. Needed to add 'Copy Local' to true on the properties to the references.
Now I'm getting an error that I'm not getting on my local machine:
"Object reference not set to an instance of an object."
Maybe am I missing a file for the license, that I need to copy over for the trial version. Because when I debug on my machine the imagine try or buy popup comes up.
Utils.writeErrorLog("A imgLen=" + imgstream.Length.ToString());
DTI.ImageMan.ImDecoder decoder = DTI.ImageMan.RegisteredDecoders.GetDecoder(imgstream);
The above is where it errors, but the imgstream isn't null.
I suspect you are running into a problem loading the DTI.ImageMan.Codecs.dll assembly. That assy is provied in both 32 and 64 bit versions, you need to copy the appropriate one for the bitness of your ASP.Net application.
Once you do that you should be OK.
Thanks for your interest in our products and please let us know if you have any questions.
Data Techniques Support
This question is closed to new answers.