Bonjour,
Je vais vous parler pour le moment que du problème mail parce que à mon avis c'est en rapport l'export excel. Alors voici le code de mon envoie de mail :
Ce code fonctionne très bien en local quand je fais démarrer sour un navigateur mais quand je publie mon projet sur Internet ça ne fonctionne plus et j'ai l'erreur global :
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 Dim LeClient As UnClient = outils.RecuperationClient(Request.QueryString("ResC")) Dim client As New System.Net.Mail.SmtpClient Dim message As New System.Net.Mail.MailMessage client.Credentials = New System.Net.NetworkCredential("**", "**") client.Port = 25 client.Host = "smtp.gmail.com" client.EnableSsl = True message.From = New System.Net.Mail.MailAddress("**") message.To.Add(LeClient._Mail) message.Subject = "Bienvenue chez défibril" message.Body = LeClient._Civilite & " " & LeClient._Nom & " " & LeClient._Prenom & ". Nous vous souhaitons la bienvenue chez défibril. Un compte client vient d'être créé pour vous, voici les identifiants de connexion à conserver : Identifiant > " & LeClient._Mail & " Mot de passe > " & LeClient._MotDePasse & ". A bientôt sur défibril." client.Send(message)
Je ne comprend pas vraiment ce qui manque pour qu'en ligne cela fonctionne, j'ai le même problème avec un export excel, ça fonctionne très bien en local mais pas en ligne.
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 Server Error in '/' Application. Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off". <!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="Off"/> </system.web> </configuration> Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL. <!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web> </configuration>
Merci de votre aide.
Cordialement
Partager