2
Answers

Configuration system failed to initialize smtpop.dll

Rudy Beset

Rudy Beset

14y
4.5k
1
Hi,

I am now trying for a few days to resolve an error.

I created a project to read from a pop3 emailbox and get the attachments from all messages, save them to a local folder.
I used the smtpop.dll freeware library.
I worked with the code on this site: http://www.fryan0911.com/2009/05/how-to-read-pop3-email-using-c.html

This is working fine in debug mode. All attachments get pulled from the emails and saved to folder.
But... when i build the project and try to run the project, from the /release folder or any other pc, then i get the error:Configuration system failed to initialize
I placed the smtpop.dll in the same folder as the .exe
i referenced and used the .dll as described on the website.

What am i doing wrong, why do i get the error after building and not while debugging ?

Can anyone shed some light on it ?

rudy


Answers (2)
0
Vikram N
NA 66 14.7k 11y
thank u Sanjeeb...Lemme try it out...:)
0
Sanjeeb Lenka
NA 22.1k 1.3m 11y
check this code:

public int SaveEmp(Emp objEmp)
{
using (SqlConnection con = new SqlConnection("Data Source=.\\SQLEXPRESS;Initial Catalog=Test;Integrated Security=True"))
{
 string query = "Emplyentry";  //stored procedure name
using (SqlCommand cmd = new SqlCommand(query , con))
{
cmd.Parameters.AddWithValue("@EmpName", objEmp.EmpName);
cmd.Parameters.AddWithValue("@EmpSal", objEmp.EmpSal);
con.Open();
int a = cmd.ExecuteNonQuery();
con.Close();
return a;
}

}
}
0
Vikram N
NA 66 14.7k 11y
Thanx a lot for ur kind reply Sanjeeb,That linkhelped me a lot...
But in dat example, database tables are used... But i need stored procedures usage... kindly help:)