This is what got when I try to reset a password and an authentication email. Is the issue with ServicePointManager.SecurityProtocol or with SmtpClient? Where do I need to change it or set it? The application is running in IIS and build in VS 2010.
[IOException: Authentication failed because the remote party has closed the transport stream.]
System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) +6707868
System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +139
System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) +297
System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) +51
System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) +166
System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) +573
System.Net.TlsStream.CallProcessAuthentication(Object state) +44
System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) +195
System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) +22
System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) +67
System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) +803
System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) +54
System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size) +105
System.Net.Mail.SmtpConnection.Flush() +30
System.Net.Mail.ReadLinesCommand.Send(SmtpConnection conn) +16
System.Net.Mail.EHelloCommand.Send(SmtpConnection conn, String domain) +22
System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint) +1137
System.Net.Mail.SmtpTransport.GetConnection(ServicePoint servicePoint) +237
System.Net.Mail.SmtpClient.GetConnection() +47
System.Net.Mail.SmtpClient.Send(MailMessage message) +1630
[SmtpException: Failure sending mail.]
System.Net.Mail.SmtpClient.Send(MailMessage message) +1998
Acs.Mail.SendErrorNotice(String strErrorMessage) in C:\Users\CR\Documents\Visual Studio 2010\Projects\WebForm2010\abc\Acs.Mail.cs:59
WebForm.Controllers.AccountController.ResetPassword(String email) in C:\Users\CR\Documents\Visual Studio 2010\Projects\WebForm2010\WebForm\Controllers\AccountController.cs:328
lambda_method(Closure , ControllerBase , Object[] ) +104
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +19
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) +224 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary
2 parameters) +27
System.Web.Mvc.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() +57
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func1 continuation) +260 System.Web.Mvc.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() +26 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList
1 filters, ActionDescriptor actionDescriptor, IDictionary2 parameters) +205 System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +326 System.Web.Mvc.Controller.ExecuteCore() +109 System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +92 System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +12 System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +34 System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +16 System.Web.Mvc.Async.<>c__DisplayClass8
1.<BeginSynchronous>b__7(IAsyncResult _) +15
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +59
System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +48
System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +12
System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +24
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +66
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +11
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9850009
System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +50
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +163
@K Amen I suggest you try it first and then discuss it when you get a problem, because it is difficult for me to reproduce your problem.