Ouverture de document word sur Sharepoint
Bonjour
Dans mon projet, j'essaie d'ouvrir un document sur sharepoint. En mode création, le document s'ouvre sans problème. Mais je quand déploie sur un serveur, il s'affiche l'erreur suivante:
Citation:
The property or field has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.
voilà le code d'initialisation de sharepoint
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
Public SiteURL As String = "https://regulation.sharepoint.com/sites/Esign"
Public folderUrl As String = "/sites/Esign/Documents%20partages"
Public SiteFolderUrl As String = "https://regulation.sharepoint.com/sites/Esign/Documents%20partages/"
Public ClientContext As SP.ClientContext = New SP.ClientContext(SiteURL)
Public oWebsite As SP.Web = ClientContext.Web
Public oFolder As SP.Folder = oWebsite.GetFolderByServerRelativeUrl(folderUrl)
Public Sub InitialisationSharepoint()
Try
ExecuteLmdMod("select * from a_parametrage")
Dim username As String = bTabl.Rows(0).Item("SmtpLogin").ToString
Dim password As String = bTabl.Rows(0).Item("SmtpPwd").ToString
password = DeCrypte(password)
Dim securedPassword As SecureString = New SecureString
For Each c As Char In password.ToCharArray()
securedPassword.AppendChar(c)
Next
ClientContext.Credentials = New SP.SharePointOnlineCredentials(username, securedPassword)
Dim library = ClientContext.Web.Lists.GetByTitle("Esign")
ClientContext.Load(library.RootFolder)
ClientContext.ExecuteQuery()
Catch
End Try
End Sub |
Où est ce que j'ai péché? Quelqu'un pour m'aider, svp