Click here to Skip to main content
15,897,371 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionThere is no row at position 0 in login page Pin
Jignesh Patel27-Apr-14 2:21
Jignesh Patel27-Apr-14 2:21 
AnswerRe: There is no row at position 0 in login page Pin
Richard Deeming28-Apr-14 2:11
mveRichard Deeming28-Apr-14 2:11 
Questionurl-rewrite complete asp.net application i want www.myurl.com/Profiles/sample.aspx?id=profilename to be like this www.myurl.com/profilename Pin
pramodgorityala25-Apr-14 8:45
pramodgorityala25-Apr-14 8:45 
AnswerRe: url-rewrite complete asp.net application i want www.myurl.com/Profiles/sample.aspx?id=profilename to be like this www.myurl.com/profilename Pin
Anurag Gandhi25-Apr-14 17:45
professionalAnurag Gandhi25-Apr-14 17:45 
GeneralRe: url-rewrite complete asp.net application i want www.myurl.com/Profiles/sample.aspx?id=profilename to be like this www.myurl.com/profilename Pin
pramodgorityala15-May-14 4:46
pramodgorityala15-May-14 4:46 
GeneralRe: url-rewrite complete asp.net application i want www.myurl.com/Profiles/sample.aspx?id=profilename to be like this www.myurl.com/profilename Pin
Anurag Gandhi16-May-14 4:09
professionalAnurag Gandhi16-May-14 4:09 
AnswerRe: url-rewrite complete asp.net application i want www.myurl.com/Profiles/sample.aspx?id=profilename to be like this www.myurl.com/profilename Pin
Dnyaneshwar@Pune27-Apr-14 23:50
Dnyaneshwar@Pune27-Apr-14 23:50 
QuestionFailure sending mail. System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established con Pin
Member 1040837325-Apr-14 6:09
Member 1040837325-Apr-14 6:09 
I am using a GoDaddy's smtpou.secureserver.net account to sending email by SMTP client from asp.net website. I have cross checked all almost all the key values and setting for SMTP but application still throw an exception at production server however the same code and logic working fine at my local machine.
Error message:

"System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 173.201.192.101:25 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)"

on sending third or 4th email.

It seems it does not connecting to server(remote machine). The emails sent perfectly earlier and i have not change any setting at the server side however getting the error again and again.

below are lines of code which i am using to send email by SMTP Client..


string SMTP_UserName = ConfigurationManager.AppSettings["SMTP_Username"].ToString();
string SMTP_Password = ConfigurationManager.AppSettings["SMTP_Password"].ToString();
string SMTP_Server = ConfigurationManager.AppSettings["SMTP_Server"].ToString(); ;
string SMTP_SSLRequired = ConfigurationManager.AppSettings["SMTP_SSLRequired"].ToString();
string SMTP_Displayname = ConfigurationManager.AppSettings["SMTP_Displayname"].ToString();
string SMTP_Port = ConfigurationManager.AppSettings["SMTP_Port"].ToString();

SmtpClient sClient;
NetworkCredential SMTPUserInfo = new NetworkCredential(SMTP_UserName, SMTP_Password);
//MailMessage mMessage = new MailMessage(From, emailTo, emailSubject, emailBody);

MailMessage mMessage = new MailMessage();
MailAddress mafrom = new MailAddress(From, SMTP_Displayname);
mMessage.From = mafrom;

if (lstTo != null && lstTo.Count > 0)
{
foreach (var item in lstTo)
{
if (item.ToString() != string.Empty)
{
mMessage.To.Add(item.ToString().Trim());
}

}
}


mMessage.Subject = emailSubject.Trim();
mMessage.Body = emailBody.Trim();


if (lstCC != null && lstCC.Count > 0)
{
foreach (var item in lstCC)
{
if (item.ToString() != string.Empty)
{
mMessage.CC.Add(item.ToString().Trim());
}

}
}

mMessage.Headers.Add("Message-Id", String.Concat("<", DateTime.Now.ToString("yyMMdd"), ".", DateTime.Now.ToString("HHmmss"), ">"));

mMessage.IsBodyHtml = true;
sClient = new SmtpClient(SMTP_Server);
sClient.Port = Convert.ToInt32(SMTP_Port);
if (SMTP_SSLRequired == "0")
{
sClient.EnableSsl = false;
}
else
{ sClient.EnableSsl = true; }

sClient.UseDefaultCredentials = true;
sClient.Credentials = SMTPUserInfo;
sClient.Timeout = Convert.ToInt32(ConfigurationManager.AppSettings["SMTPTimeOut"].ToString());

sClient.Send(mMessage);
// sClient.SendAsync(mMessage, null);
result = true;


any help would be greatly appreciated.
A lot of thanks in advance.
AnswerRe: Failure sending mail. System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established Pin
DamithSL26-Apr-14 19:05
professionalDamithSL26-Apr-14 19:05 
GeneralRe: Failure sending mail. System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established Pin
Dnyaneshwar@Pune28-Apr-14 0:04
Dnyaneshwar@Pune28-Apr-14 0:04 
QuestionTable doubt Pin
Hari-CodeBlogger24-Apr-14 20:14
Hari-CodeBlogger24-Apr-14 20:14 
AnswerRe: Table doubt Pin
Tom Marvolo Riddle24-Apr-14 21:03
professionalTom Marvolo Riddle24-Apr-14 21:03 
GeneralRe: Table doubt Pin
Hari-CodeBlogger25-Apr-14 1:20
Hari-CodeBlogger25-Apr-14 1:20 
GeneralRe: Table doubt Pin
Hari-CodeBlogger25-Apr-14 18:37
Hari-CodeBlogger25-Apr-14 18:37 
GeneralRe: Table doubt Pin
Tom Marvolo Riddle27-Apr-14 18:20
professionalTom Marvolo Riddle27-Apr-14 18:20 
GeneralRe: Table doubt Pin
Hari-CodeBlogger6-May-14 23:55
Hari-CodeBlogger6-May-14 23:55 
QuestionChart control X-axis label contains double values with more precision Pin
Kandepu Rajesh24-Apr-14 20:11
Kandepu Rajesh24-Apr-14 20:11 
Questionproject code Pin
varun kumar23-Apr-14 8:19
varun kumar23-Apr-14 8:19 
AnswerRe: project code PinPopular
David Mujica23-Apr-14 8:56
David Mujica23-Apr-14 8:56 
QuestionMessage Removed Pin
23-Apr-14 6:19
miss78623-Apr-14 6:19 
QuestionNeed help updating user information asp.net c# Pin
lala2422-Apr-14 10:52
lala2422-Apr-14 10:52 
AnswerRe: Need help updating user information asp.net c# Pin
Wes Aday22-Apr-14 11:11
professionalWes Aday22-Apr-14 11:11 
AnswerRe: Need help updating user information asp.net c# Pin
Praneet Nadkar7-May-14 18:19
Praneet Nadkar7-May-14 18:19 
Questionscrolling jquery popup in Page Pin
Member 947380922-Apr-14 10:38
Member 947380922-Apr-14 10:38 
QuestionMerge 2 cell in Open XML Pin
byka22-Apr-14 2:53
byka22-Apr-14 2:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.