News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Getting Error when opening visio document through Visio SDK 2010 from sharepoint

Started by zeeshan3, January 19, 2012, 09:56:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

aledlund

"I am not trying to open it from a network", is a common misconception since you are using networking (even if it is on the same machine).

"So, I don't think that firewalls could be the problem in this case.", firewalls are probably not the issue in your configuration - but that does not rule out permissions. I'd start by investigating the directory properties => security and see who is authorized.

If you cannot open the file with Visio directly, then attempting to open it via code is probably a waste of time - since both Visio and your application are going to run into the same problem.

Since you can open the file when it is truly local (and not owned by sharepoint), it is probably not a Visio problem. It is how you have Sharepoint set up, or are attempting to access it.

al

zeeshan3


I am able to open the directly through Visio and also through Sharepoint by going to the document library.

I also created a simple asp.net web application and tried to access the same Visio drawing in it through the Visio Interop API and it was successfully opened.

So, If the file is opening from everywhere except sharepoint, it may be a permissions issue with sharepoint but I have checked all the permissions given to sharepoint and the document library and the folder in which the file resides.

labiche

I am having a very similar problem but it is when I try to OpenEx the "Basic_U.vss" stencil.

The code has been working quite well in a console application but now I'm porting it into a Sharepoint Webpart.

I've been advised to map a folder for TEMPLATES into my visual studio solution, but haven't got the magic right yet.
Anyone know if this thread was solved?

thanks,

Maurice


Code is:

Visio.Document visioStencilDocument = oVisio.Documents.OpenEx("Basic_U.vss",
                    (short)Microsoft.Office.Interop.Visio.VisOpenSaveArgs.visOpenHidden);



Exception Text is:  (with partial stack trace)
System.Runtime.InteropServices.COMException was unhandled by user code
  Message=The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))
  Source=Microsoft.Office.Interop.Visio
  ErrorCode=-2147417851
  StackTrace:
       at Microsoft.Office.Interop.Visio.DocumentsClass.OpenEx(String FileName, Int16 Flags)

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 179 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1095KB.
Tokens: post-login.
Cache hits: 13: 0.00143s for 26,762 bytes (show)
Cache misses: 2: (show)
Queries used: 15.

[Show Queries]