VSTO Add-Ins get disabled when opening a file from Sharepoint or SkyDrive using Windows Explorer: Invalid URI

Answered VSTO Add-Ins get disabled when opening a file from Sharepoint or SkyDrive using Windows Explorer: Invalid URI

ตอบทั้งหมด

  • 24 กุมภาพันธ์ 2555 7:06
    ผู้ดูแล
     
     

    Hi,

    I tried to run the scenario as above, but could not reproduce the problem. I tried to deploy Word addin in both Clickonce and Windows Installer, open document from Sharepoint library works, open document located in Skydrive also works.  Note that the Sharepoint server doesn't enable SSL, do you have SSL enable in Sharepoint?

    I noticed that in your Process Explorer finding, working directory contains sign '@' , not sure why it is there. But I'm pretty sure this caused the exception.

    From callstack, it looks the exception pops up when install the addin, could you check where you published the addin to?

    Best Regards,


    Forrest Guo | MSDN Community Support | Feedback to us

  • 24 กุมภาพันธ์ 2555 15:43
     
     

    If the '@' sign is the problem in the URL, it is a problem of WebDAV over a HTTPS connection then, not over HTTP.
    The '@SSL' supposedly indicates that an SSL connection should be used.
    We have multiple Sharepoint sites where we use SSL because they are available on the internet.

    Could you try it from Skydrive?
    Skydrive also uses SSL.
    When logging into https://www.skydrive.com and navigating to a directory, there is a 'cid' in the querystring.
    With "\\d.docs.live.net@SSL\<cid>" in Windows explorer, it is possible to open documents from SkyDrive from Windows explorer.
    This is also used by Word when you use File -> Save & Send -> Save to web

    The installation location of the VSTO (we use location like  http://computer/test.vsto) does not matter, the error is because of the current directory.
    Unfortunately, the VSTO add-ins get disabled after installation too, even if the update frequency is set to 'Never'

     

  • 24 กุมภาพันธ์ 2555 15:58
    ผู้ดูแล
     
     

    Hi,

    I have tried Windows Live Skydrive, which url is https://skydrive.live.com/ , different from what you mentioned. The Word addin loads well in this situation. When you mentioned, you check the working directory by Process Explorer and get \\d.docs.live.net@SSL\DavWWWRoot\<cid> Would you let me know how you get it. I ask because I don't see Working Directory property in Word process in Process Explorer.

    Best Regards,


    Forrest Guo | MSDN Community Support | Feedback to us

  • 27 กุมภาพันธ์ 2555 3:15
    ผู้ดูแล
     
     

    Hi,

    Is there any progress made over there? Let me know if I can help please.

    Regards,


    Forrest Guo | MSDN Community Support | Feedback to us

  • 2 มีนาคม 2555 10:08
     
     

    Yes, I'm sorry, it is skydrive.live.com, but that is only to find out the CID to use.
    Please log on toskydrive, navigate to a folder (e.g. 'Documents'), the browser shows an url like:
    https://skydrive.live.com/#cid=8859DD4133671A0E&id=8859DD4133671A0E%21129

    The code 8859DD4133671A0E is the CID here, this code is different for every user (this one is fake, I made up one).

    The steps I use are:

    1. Make sure all  Word processes are shut down, no winword.exe in process explorer
    2. Open Windows explorer (not the browser)
    3. Enter \\d.docs.live.net@SSL\DavWWWRoot\8859DD4133671A0E where 8859DD4133671A0E is the CID retrieved from skydrive website
    4. Enter credentials
    5. Navigate to a subfolder with a .docx
    6. Open the document by double-clicking
    7. Word opens with a working directory \\d.docs.live.net@SSL\DavWWWRoot\8859DD4133671A0E\Subfolder 
        See Process Explorer to check
    8. VSTO add-ins fail

  • 7 มีนาคม 2555 7:17
     
     

    Hi,

    currently i have build an application level add-in for word. i'm using some custom user controls inside the add in.

    the add-in was running smoothly except when i open the document template from sharepoint. if i open it from sharepoint, the add-in was loaded because i can see my custom ribbon but not my other custom controls(i'm using somekind of an action pane on the left side on the document layout). all of my code validation for the add-in is not triggered

    does anybody know what went wrong?

    really need help on this issue.

    Thanks.

    -Willy-


    -Regards- Willy Noviandy

  • 7 มีนาคม 2555 8:02
     
     
    Add some logging to your add-in or attach debugger and see what is executed.
  • 7 มีนาคม 2555 8:17
     
     

    Hi Damian,

    i already did that, i also add some messagebox on the code to see whether the code is being triggered or not. but the result is still nothing. i use addinspy to check the add in, the add in was successfuly loaded but not my validation code behind the add in.

    i got lost there.

    any other idea?

    Thanks.


    -Regards- Willy Noviandy

  • 7 มีนาคม 2555 14:11
    ผู้ดูแล
     
     คำตอบ

    Hi,

    Thank you sending us the detail reproduce steps. I did reproduced this problem at first, but later on, I found the clue.

    Results depends on the way we deploy Word addin:

    1. if it's deployed to normal folder, like c:\users\xx\documents\project\, then I see this error;
    2. but I run the addin successfully if it is deployed by Windows installer, deployed to folder like: c:\program files\Microsoft\WordAddin\, then opening document on https folder will load the addin without any problem.

    So, I agree item 1 is a defect that we can improve; and item2 could be a way that could work out the scenario.

    I have created a connect issue report as below, people can follow up the issue:

    https://connect.microsoft.com/VisualStudio/feedback/details/729380/word-addin-pops-up-error-system-uriformatexception-invalid-uri-the-hostname-could-not-be-parsed#details

    Best Regards,


    Forrest Guo | MSDN Community Support | Feedback to us

  • 13 มีนาคม 2555 3:44
    ผู้ดูแล
     
     คำตอบ

    Got confirmation from VSTO engineering team: VSTO addin doesn't load via UNC path, that SSL is enabled. The workaround include:

    1. Open the document using a regular https URL rather than using UNC (\\) notation
    2. Copy the document locally manually, then open from that location

    Best Regards,


    Forrest Guo | MSDN Community Support | Feedback to us