I am getting following exception when i send Email.Please help.
FailureSystem.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:25 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) --- End of inner exception stack trace --- at System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout) at System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback) at System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback) at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout) at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpClient.GetConnection() at System.Net.Mail.SmtpClient.Send(MailMessage message) --- End of inner exception stack trace --- at System.Net.Mail.SmtpClient.Send(MailMessage message) at Compose.SendButton_Click(Object sender, EventArgs e) in c:\Users\kavitha\Documents\Visual Studio 2008\WebSites\Message\Compose.aspx.cs:line 133
you find out what happens when you copy code without understanding it, I guess. There's nothing wrong with googling for code, I spent the week doing that. But, once you find a snippet that says it will do what you want, you should read up and understand it so you can work on it if you need to.
Hi i am trying to count the number of button clicks in asp.net page.
i am declaring a global variable. so every time when page refreshes creating a new object..so count going to 0. So how can i save this value in the view state?
Hi this code is fine when i am using it in a simple webform
but when i am creating a web form with validators this code is neither giving any output nor showing any error messages.can u please help me on this?