Hello!
I have just started to work with the Infragistics.Documents.Word namespace.
I tried to create a simple document using the following code:
Dim doc as new Infragistics.Documents.Word.Document
doc.save(filename)
This code creates a file but it also generates an exception. The exception is of type
"The type initializer for MS.Utility.EventTrace threw an exception"
I have implemented code that creates some text inside the document but that isn't included when it is saved. So something is wrong.
I am creating these files on a server with special rules of accesscontrol.
I am pretty sure that this has something to do with the server settings and not the Infragistics tools, but with an
exception like that, I am totally lost.
Someone out there who understands the problem?
/Henrik
But where do you mean the web.config file should be located in my project?
My Project consists of one windows application and two class libraries.
I am trying to create the files on a file server, using my windows application Project...
Hi Henrik,
You do not need to change the app.config of your Windows Forms application. You need to change the web.config of the application which manages the service you are using to connect to the server.
Please check this application and let me know if this solves your issue.
Looking forward to your reply
Milko, any news in this topic?
I cannot say that I undestand what to do in the app.config file. Can you help?
If I create xlsx files using com interop, there is no problem. I am not sure why this is a problem when I use the grid export functionality.
and this approach works the same if it is a windows application? Because the client is a windows application.
/H
Hello Henrik,
Thank you for your feedback
The Package.Open methods in the WindowsBase assembly are using tracing when opening stream. It seems like there is a trace listener that need certain permissions to run, and it does not have it, so this is causing the issue. Please check if you can remove the tracing from your web.config file. Please follow the next link to find how you can remove listeners https://msdn.microsoft.com/en-us/library/w11c2b46%28v=vs.110%29.aspx
Please let me know if this solves your issue.
Looking forward to your feedback.