ASP.NET C# wrapper on IIS6 windows 2003

Started by hobbis, December 05, 2011, 11:11:28 AM

Previous topic - Next topic

hobbis

Hi,

I have tried to use the C# wrapper provided on the home page (https://exiftool.org/ExifToolWrapper_cs.zip) which I have working fine on my local PC. I am able to retrieve all tags from an image file and update EXIF and XMP meta data, then save the image to disk.

However, when I put it on my windows server, it hangs forever when trying to read all tags. I have given full permissions to the ASP.NET user, other user groups and the Network Service, and the website runs under Full Trust.

I use the Process object to start up exiftool.exe (which currently sits in the /bin directory). The files are sometimes very large - approx 7Mb. But even with much smaller files it just hangs.

Has anyone else tried to do this on windows server 2003 IIS6? Are there any gotchas I should know about? If anyone has tried to do the same thing, your experience and advice would be greatly appreciated!

Thanks,
Chris.

Phil Harvey

Hi Chris,

I don't have any experience with this in particular, but generally these are the things I have had problems with when running software from a web server:

1) permissions are different (which you already considered)

2) environment is different (check all environment variables)

3) default/working directory is different

These differences may be exacerbated by the fact that exiftool.exe is a self-extracting package that unpacks and runs itself from files in a temporary directory.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

hobbis

Thanks for your reply Phil. Great job with this library. I have got it updating data but I think the problem was with reading the image stream into the process info object for me to get the output (passing in the image file name did not give any screen scraping output but reading the image as a stream did).

I am still investigating and I will update the message board with my findings.

For now, in ASP.NET I am able to read Bitmap meta data (using the Windows Imaging Component) and get almost everything I need that way. I would rather use your ExifTool to read the meta data as this is so much more comprehensive compared to .NET's abilities to read meta data.

Thanks for all your efforts. I will post my final C# classes for those interested.