Note that there are some explanatory texts on larger screens.

plurals
  1. POweb.config configuration Error
    primarykey
    data
    text
    <p>Everything should be good, but my web.config gives me this strange error.</p> <p>How can I get this error if I am sure my stringlist in the web.config is good?</p> <p><strong>Error:</strong> <br> Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. </p> <pre><code>Parser Error Message: Unrecognized configuration section stringlist. Source Error: Line 6: &lt;connectionStrings/&gt; Line 7: Line 8: &lt;stringlist key="SmtpServers"&gt; Line 9: &lt;stringlistItem value="smtp.transip.nl" /&gt; Line 10: &lt;stringlistItem value="localhost" /&gt; Source File: C:\local\vCardGenerator.Website\vCardGenerator.Website\web.config Line: 8 </code></pre> <p><strong>Web.config:</strong> <br></p> <pre><code> &lt;stringlist key="SmtpServers"&gt; &lt;stringlistItem value="smtp.transip.nl" /&gt; &lt;stringlistItem value="localhost" /&gt; &lt;/stringlist&gt; </code></pre> <p><strong>Class:</strong> <br></p> <pre><code>using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Web.Configuration; using System.Net.Mail; using System.Net.Configuration; using Compulutions.Net; using Compulutions.Web; using System.IO; using System.Web.Mail; using System.Collections.Generic; using System.ComponentModel; using System.Web.Services.Description; // System.Web.Mail.SmtpMail.SmtpServer // using System.Web.Mail.SmtpClient; namespace vCardGenerator.Website.Masterpage { public class SendvCard { // public void MailvCard(string recipient, string filename) { Mailer smtp = new Mailer("smtpServers"); /* SMTP - port 25 */ smtp.AddAttachment(filename); //.vcf file Path smtp.FromAddress = new MailAddress("someone@domain.nl"); smtp.Subject = "vCard"; smtp.MailBody = "There is a vCard waiting for you in the attachment!"; smtp.AddRecipient(recipient); #if !DEBUG try { #endif smtp.SendMail(); #if !DEBUG } catch (Exception ex) { Response.Write("Exception Occured: " + ex); //Responds.Write("Sending vCard Failed, Please try again!") } #endif } } } </code></pre> <p>Similar Questions don't fit my description. I have created an instance of SendvCard.cs and invoked the send method in the class (MailvCard)</p> <p><strong>aspx.cs itself:</strong><br></p> <pre><code> // Calls the method at the class smtp.MailvCard("user@domain.com", "C:\\local\\vCardGenerator.Website" + "\\" + "FirstName_LastName" + ".vcf"); } </code></pre> <p>Willing to provide any other/more information if needed.</p> <p>Sincerely</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload