Bonjour,
J'ai un problème avec une fonction pour récupérer une note d’une entité.
La fonction retourne une erreur dans les évènements Windows et aussi dans le fichier que je récupère puisqu’après la récupération de la note, je l’envoie par email.
Dans le fichier que je reçois, j’ai un “Access denied”.
Voici mon code :
Merci d’avance pour vos réponses.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 private static byte[] GetAnnotationAttachment(Guid annotationId) { Guid attachid = annotationId; int objecttypecode = 5; //Annotation attachment OTC string url = "http://192.168.0.9/Activities/Attachment/download.aspx?AttachmentType=" + objecttypecode.ToString() + "&AttachmentId={" + attachid.ToString() + "}"; System.Net.WebClient myWebClient = new System.Net.WebClient(); myWebClient.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials; return myWebClient.DownloadData(url); }
Partager