Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using Graphviz Dlls in asp.net c# application

I am using the Graphviz Dlls in an asp.net application, i am using the method described here to access the Dlls through my c# code:-

http://implicitoperator.com/blog/2010/4/11/graphviz-c-sample.html

http://implicitoperator.com/blog/2009/12/24/rendering-an-in-memory-graphviz-image-with-c.html

Everything works as i expect on my local machine while debugging and i get a pdf of my graph back.

The problem is when the application is deployed to our UAT server the graph isn't generated. No exceptions are thrown and there seem to be no errors at all i just get an empty PDF back instead of a PDF with a graph.

I have checked that the application has the correct permissions to call unmanaged code, i have checked the application can find the graphviz Dlls and i have checked that the dot code going into the method call is the same locally as it is on the server. Everything checks out fine.

i am tearing my hair out with this problem, anyone got any ideas what the problem could be ?

like image 423
matthew Avatar asked Apr 21 '11 13:04

matthew


2 Answers

An idea to try: load the main Graphviz Dll in depends.exe http://en.wikipedia.org/wiki/Dependency_Walker.

may be you are a missing dependency.

like image 80
flacours Avatar answered Oct 02 '22 07:10

flacours


How are you registering the dll? Double check the web.config on the server perhaps (maybe you missed something there)?

Also like Justin C suggested, make sure there is not a temp folder on the server that the dll is using to stream write/create the PDFs into. You might need to allow write privileges to that folder etc.

like image 30
Todd Sloan Avatar answered Oct 02 '22 06:10

Todd Sloan