I try to access a Word file inside a SharePoint document library. When the document is about to be fetched from the server the Apose.Words.Document constructor throws an exception with the message “The remote server returned an error: (401) Unauthorized.”
These two lines can reproduce the error with Aspose.Words version 15.9:
var fileName = "https://spserver.com/projects/project1/doclib/my_word_file.docx"; var document = new Document(fileName);
Accessing the document on
https://spserver.com/projects/project1/doclib/my_word_file.docx via Internet Explorer 11 or Word 2013 works fine.
I guess the SharePoint server is only accessible inside the corporate network if the network traffic is routed through the network proxy. Is there a way to programmatically set a proxy server for Aspose.Words?