Ask a questionAsk a question
 

QuestionAccessing a Live file from within a Word AddIn

  • Wednesday, June 17, 2009 9:30 PMDavidThi808 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code

    Hi;

    If this is not the right forum, please let me know which is.

    In my AddIn I call the following code where the filename is the file I
    am editing and it is a Microsoft Live file

    filename="http://adamm515.workspace.office.live.com/90359bb4-dede-494c-b024-57dc8611d0f5/Docs/Windward Trucking Template 2.docx"

    Also weird that the file will not come up if pasted in a browser. But it is the filename returned by Word to my AddIn.

    WebRequest req = WebRequest.Create(filename);
    WebResponse resp = req.GetResponse();
    

    And on GetResponse() I get the exception:

    System.Net.WebException occurred
      Message="The remote server returned an error: (501) Not
    Implemented."
      Source="System"
      StackTrace:
           at System.Net.HttpWebRequest.GetResponse()
           at net.windward.utils.FileUtils.GetStream(String filename) in
    C:\src\holomua\Kailua\net\windward\utils\FileUtils.cs:line 113
      InnerException: 
    

    Any idea why?

    thanks - dave


    Cubicle Wars - www.windwardreports.com/film.htm
    • Moved byYi-Lun LuoMSFTThursday, June 18, 2009 5:25 AMOff topic. (From:Live Framework)
    •  

All Replies