Bonjour,
J'ai déployé une application web asp.net avec C#.
Dans mes pages, j'essaye d'ouvrir de fois des fichiers enregistrés sur le D:\ mais hélàs.
Mon code d'ouverture de fichier est:
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
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
        protected void LbtnOuvrir_Click(object sender, EventArgs e)
        {
            string sql = "SELECT FICHIER FROM F_SENTENCE WHERE IDDOSSIER= " + Request.QueryString["ID"];
                        
            try
            {
                Parametres.Connect_Load();
                Parametres.Commande.Connection = Parametres.connBD;
                Parametres.Commande.CommandText = sql;
                Parametres.LectureData = Parametres.Commande.ExecuteReader();
                while (Parametres.LectureData.Read())
                {
                    openFilePDFandDOC(@"D:\FileServer\REQUETES_DOSSIERS\" + Parametres.LectureData.GetString(0).ToString());
                   
                }
                Parametres.LectureData.Close();
                Parametres.DeConnect_Load();
            }
            catch
            {
                erreur.Visible = true;
                erreur.Text = "Impossible d'ouvrir la pièce jointe";
            }
        }
        protected void openFilePDFandDOC(string command)
        {
            var process = new System.Diagnostics.Process
            {
                StartInfo = new System.Diagnostics.ProcessStartInfo(command)
            };
            process.Start();
        }
ou FICHIER contient le nom du fichier à ouvrir.
A ma grande surprise, le fichier ne s'ouvre pas sur une machine client mais s'ouvre si je le fais sur le serveur.

De l'aide, je cherche pour pouvoir ouvrir le fichier sur une machine client