在 asp.net C# 应用程序中使用 Graphviz Dlls
我在 asp.net 应用程序中使用 Graphviz Dlls,我使用此处描述的方法通过我的 C# 代码访问 Dlls:-
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
在调试时,一切都按照我在本地计算机上的预期工作,并且我得到了 pdf我的图表回来了。
问题是当应用程序部署到我们的 UAT 服务器时,不会生成图表。没有抛出任何异常,而且似乎根本没有错误,我只是得到一个空的 PDF,而不是带有图表的 PDF。
我已检查应用程序是否具有调用非托管代码的正确权限,我已检查应用程序是否可以找到 graphviz Dll,并且我已检查进入方法调用的点代码在本地与服务器上是否相同。一切都很好。
我对这个问题感到抓狂,有人知道问题可能是什么吗?
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 ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一个尝试的想法:在depends.exe中加载主要的Graphviz Dll http://en.wikipedia.org/wiki /Dependency_Walker。
可能你是一个缺失的依赖者。
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.
你是如何注册dll的?仔细检查服务器上的 web.config(也许你错过了一些东西)?
同样像 Justin C 建议的那样,确保 dll 用来流式写入/创建 PDF 的服务器上没有临时文件夹。您可能需要允许对该文件夹等的写入权限。
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.