Publicidade
|
|
Page 1 of 1
toolbox password recovery no ASP.NET Mensagem de erro. O que fazer ?
#1
Posted 22 March 2009 - 03:57 PM
Pessoal,
estou criando uma parte de login no site usando este toolbox. Tudo montado, mas na ultima hora.. na hora que respondo à ultima pergunta, ele me dá o erro abaixo. O que devo fazer ? Acredito eu estar faltando algo para configurar. Poderia me ajudar mais uma vez por favor ?
Your attempt to retrieve your password was not successful. Please try again.
Your answer could not be verified. Please try again.
Answer the following question to receive your password.
We were unable to access your information. Please try again.
Enter your User Name to receive your password.
Server Error in '/IBCEI' Application.
________________________________________
A from e-mail address must be specified in the From property or the system.net/mailSettings/smtp config section.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: A from e-mail address must be specified in the From property or the system.net/mailSettings/smtp config section.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): A from e-mail address must be specified in the From property or the system.net/mailSettings/smtp config section.]
System.Web.UI.WebControls.MailDefinition.CreateMailMessage(String recipients, IDictionary replacements, String body, Control owner) +330
System.Web.UI.WebControls.LoginUtil.CreateMailMessage(String email, String userName, String password, MailDefinition mailDefinition, String defaultBody, Control owner) +182
System.Web.UI.WebControls.LoginUtil.SendPasswordMail(String email, String userName, String password, MailDefinition mailDefinition, String defaultSubject, String defaultBody, OnSendingMailDelegate onSendingMailDelegate, OnSendMailErrorDelegate onSendMailErrorDelegate, Control owner) +482
System.Web.UI.WebControls.PasswordRecovery.AttemptSendPasswordQuestionView() +743
System.Web.UI.WebControls.PasswordRecovery.AttemptSendPassword() +105
System.Web.UI.WebControls.PasswordRecovery.OnBubbleEvent(Object source, EventArgs e) +135
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +107
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +178
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBa
ckEvent(String eventArgument) +31
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +72
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3838
________________________________________
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
abraços
estou criando uma parte de login no site usando este toolbox. Tudo montado, mas na ultima hora.. na hora que respondo à ultima pergunta, ele me dá o erro abaixo. O que devo fazer ? Acredito eu estar faltando algo para configurar. Poderia me ajudar mais uma vez por favor ?
Your attempt to retrieve your password was not successful. Please try again.
Your answer could not be verified. Please try again.
Answer the following question to receive your password.
We were unable to access your information. Please try again.
Enter your User Name to receive your password.
Server Error in '/IBCEI' Application.
________________________________________
A from e-mail address must be specified in the From property or the system.net/mailSettings/smtp config section.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: A from e-mail address must be specified in the From property or the system.net/mailSettings/smtp config section.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): A from e-mail address must be specified in the From property or the system.net/mailSettings/smtp config section.]
System.Web.UI.WebControls.MailDefinition.CreateMailMessage(String recipients, IDictionary replacements, String body, Control owner) +330
System.Web.UI.WebControls.LoginUtil.CreateMailMessage(String email, String userName, String password, MailDefinition mailDefinition, String defaultBody, Control owner) +182
System.Web.UI.WebControls.LoginUtil.SendPasswordMail(String email, String userName, String password, MailDefinition mailDefinition, String defaultSubject, String defaultBody, OnSendingMailDelegate onSendingMailDelegate, OnSendMailErrorDelegate onSendMailErrorDelegate, Control owner) +482
System.Web.UI.WebControls.PasswordRecovery.AttemptSendPasswordQuestionView() +743
System.Web.UI.WebControls.PasswordRecovery.AttemptSendPassword() +105
System.Web.UI.WebControls.PasswordRecovery.OnBubbleEvent(Object source, EventArgs e) +135
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +107
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +178
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBa
ckEvent(String eventArgument) +31
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +72
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3838
________________________________________
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
abraços
#6
Posted 24 March 2009 - 11:14 PM
você precisa configurar o servidor de emails (SMTP)
dá uma olhada aki
CÓDIGO
<system.net>
<mailSettings>
<smtp from="user@dominio.com.br">
<network host="_seu_smtp.dominio.com.br" password="SenhaDoUsuario" userName="user@dominio.com.br"/>
</smtp>
</mailSettings>
</system.net>
<mailSettings>
<smtp from="user@dominio.com.br">
<network host="_seu_smtp.dominio.com.br" password="SenhaDoUsuario" userName="user@dominio.com.br"/>
</smtp>
</mailSettings>
</system.net>
dá uma olhada aki
#8
Posted 25 March 2009 - 03:38 PM
Cuidado!
Você tem que saber qual é o componente de e-mail que é utilizado pelo seu servidor. Pode ser vários, como: IIS, CDOSYS.
Caso seja CDOSYS como o meu, segue um exemplo de como você fazer o envio:
Lembrando que desta forma não é preciso utilizar nenhum processo no web.config
Usando o Visual Studio 2005 criei uma página chamada form.aspx e abaixo está o código para montar a parte visual do seu formulário:
Pronto O sistema de envio de e-mail com CDOSYS está concluído.
Abs a todos. Espero ter ajudado!
Você tem que saber qual é o componente de e-mail que é utilizado pelo seu servidor. Pode ser vários, como: IIS, CDOSYS.
Caso seja CDOSYS como o meu, segue um exemplo de como você fazer o envio:
Lembrando que desta forma não é preciso utilizar nenhum processo no web.config
Usando o Visual Studio 2005 criei uma página chamada form.aspx e abaixo está o código para montar a parte visual do seu formulário:
CÓDIGO
<form id=”form1″ runat=”server”>
<div>
<h2>
Fale Conosco</h2>
<p>
Nome:
<asp:TextBox ID=”txtnome” runat=”server” Width=”280px”></asp:TextBox>
<br />
E-mail:
<asp:TextBox ID=”txtemail” runat=”server” Width=”277px”></asp:TextBox>
<br />
Comentários:
<br />
<asp:TextBox ID=”txtcomentarios” runat=”server” Width=”326px” Height=”69px”
TextMode=”MultiLine”></asp:TextBox>
</p>
<p>
<asp:Button ID=”Button1″ runat=”server” Text=”Enviar” />
</p>
<p>
<asp:Label ID=”lblmensagem” runat=”server”></asp:Label>
<br />
</p>
</div>
</form>
Abaixo estão os códigos do arquivo form.aspx.vb com comentarios para enviar o e-mail.
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim nome As String = txtnome.Text ‘captura os dados do campo nome
Dim email As String = Trim(txtemail.Text) ‘Tira os espaços se houver e captura os dados do campo e-mail
Dim comentarios As String = txtcomentarios.Text ‘Captura os dados do campo comentarios
‘abaixo estão as configurações do CDOSYS o que deve ser alterado está com comentario o restante não precisa modificar
Dim sch = “http://schemas.microsoft.com/cdo/configuration/”
Dim cdoConfig = Server.CreateObject(”CDO.Configuration”)
cdoConfig.Fields.Item(sch & “sendusing”) = 2
cdoConfig.Fields.Item(sch & “smtpauthenticate”) = 1
cdoConfig.Fields.Item(sch & “smtpserver”) = “smtp.site.com.br” ‘digite seu servidor SMTP
cdoConfig.Fields.Item(sch & “smtpserverport”) = 25 ‘Digite a porta segura para envio 25 é padrão
cdoConfig.Fields.Item(sch & “smtpconnectiontimeout”) = 30
‘os e-mails são enviados apenas com autenticação por isso você terá que informar um email e senha válido
cdoConfig.Fields.Item(sch & “sendusername”) = “web@seu_dominio.com.br” ‘digite um email válido para autenticar
cdoConfig.Fields.Item(sch & “sendpassword”) = “senha” ‘digite sua senha
cdoConfig.fields.update()
Dim cdoMessage = Server.CreateObject(”CDO.Message”)
cdoMessage.Configuration = cdoConfig
cdoMessage.From = email ‘ENDEREÇO DE E-MAIL QUE SERÁ EXIBIDO NO FROM DA MENSAGEM
cdoMessage.To = “contato@seudomínio.com.br” ‘digite o email para qual a mensagem será entregue.
cdoMessage.Subject = “Fale Conosco” ‘ Digite o assunto da mensagem
Dim strBody = comentarios
cdoMessage.HTMLBody = strBody
Try
cdoMessage.Send()
cdoMessage = Nothing
cdoConfig = Nothing
’se não houver erros a mensagem é enviada e a mensagem abaixo é exibida
lblmensagem.Text = “Mensagem entregue com sucesso”
‘limpa os campos do formulario
txtcomentarios.Text = Nothing
txtemail.Text = Nothing
txtnome.Text = Nothing
Catch ex As Exception
’se houver algum erro, captura a mensagem de erro do servidor e exibe na tela
Dim erro_mail As String = “Erro na hora de enviar email : ” & ex.Message
lblmensagem.Text = erro_mail
cdoMessage = Nothing
cdoConfig = Nothing
End Try
End Sub
<div>
<h2>
Fale Conosco</h2>
<p>
Nome:
<asp:TextBox ID=”txtnome” runat=”server” Width=”280px”></asp:TextBox>
<br />
E-mail:
<asp:TextBox ID=”txtemail” runat=”server” Width=”277px”></asp:TextBox>
<br />
Comentários:
<br />
<asp:TextBox ID=”txtcomentarios” runat=”server” Width=”326px” Height=”69px”
TextMode=”MultiLine”></asp:TextBox>
</p>
<p>
<asp:Button ID=”Button1″ runat=”server” Text=”Enviar” />
</p>
<p>
<asp:Label ID=”lblmensagem” runat=”server”></asp:Label>
<br />
</p>
</div>
</form>
Abaixo estão os códigos do arquivo form.aspx.vb com comentarios para enviar o e-mail.
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim nome As String = txtnome.Text ‘captura os dados do campo nome
Dim email As String = Trim(txtemail.Text) ‘Tira os espaços se houver e captura os dados do campo e-mail
Dim comentarios As String = txtcomentarios.Text ‘Captura os dados do campo comentarios
‘abaixo estão as configurações do CDOSYS o que deve ser alterado está com comentario o restante não precisa modificar
Dim sch = “http://schemas.microsoft.com/cdo/configuration/”
Dim cdoConfig = Server.CreateObject(”CDO.Configuration”)
cdoConfig.Fields.Item(sch & “sendusing”) = 2
cdoConfig.Fields.Item(sch & “smtpauthenticate”) = 1
cdoConfig.Fields.Item(sch & “smtpserver”) = “smtp.site.com.br” ‘digite seu servidor SMTP
cdoConfig.Fields.Item(sch & “smtpserverport”) = 25 ‘Digite a porta segura para envio 25 é padrão
cdoConfig.Fields.Item(sch & “smtpconnectiontimeout”) = 30
‘os e-mails são enviados apenas com autenticação por isso você terá que informar um email e senha válido
cdoConfig.Fields.Item(sch & “sendusername”) = “web@seu_dominio.com.br” ‘digite um email válido para autenticar
cdoConfig.Fields.Item(sch & “sendpassword”) = “senha” ‘digite sua senha
cdoConfig.fields.update()
Dim cdoMessage = Server.CreateObject(”CDO.Message”)
cdoMessage.Configuration = cdoConfig
cdoMessage.From = email ‘ENDEREÇO DE E-MAIL QUE SERÁ EXIBIDO NO FROM DA MENSAGEM
cdoMessage.To = “contato@seudomínio.com.br” ‘digite o email para qual a mensagem será entregue.
cdoMessage.Subject = “Fale Conosco” ‘ Digite o assunto da mensagem
Dim strBody = comentarios
cdoMessage.HTMLBody = strBody
Try
cdoMessage.Send()
cdoMessage = Nothing
cdoConfig = Nothing
’se não houver erros a mensagem é enviada e a mensagem abaixo é exibida
lblmensagem.Text = “Mensagem entregue com sucesso”
‘limpa os campos do formulario
txtcomentarios.Text = Nothing
txtemail.Text = Nothing
txtnome.Text = Nothing
Catch ex As Exception
’se houver algum erro, captura a mensagem de erro do servidor e exibe na tela
Dim erro_mail As String = “Erro na hora de enviar email : ” & ex.Message
lblmensagem.Text = erro_mail
cdoMessage = Nothing
cdoConfig = Nothing
End Try
End Sub
Pronto O sistema de envio de e-mail com CDOSYS está concluído.
Abs a todos. Espero ter ajudado!
This post has been edited by WilsonJR: 04 April 2009 - 10:41 AM
Reason for edit: Adicionado BBCode [CODE]
Share this topic:
Page 1 of 1
Similar Topics
| Topic | Forum | Started By | Stats | Last Post Info | |
|---|---|---|---|---|---|
|
Fosamax En Argentina
Farmacia A Bajo Precio Sin Receta Fosamax Paquete Postal Medicamento U |
Galeria Freehand | Guest_ColoCheambmex_* |
|
|
|
flash aparece como padrão
não quero abrir isso com o flash |
Flash & ActionScript |
michellepb
|
|
|
|
Error!!!
Ajude plz! |
MySQL |
Enterlein
|
|
|
|
como fazer para o php conectar ao bd acess?
|
PHP |
Igor de Paula
|
|
|
|
Software para fazer download de diretorio
|
Dúvidas Gerais |
fabioricotta
|
|
|
|
Nintendo divulga relação de jogos que constarão...
WNews |
Notícias |
TiTi Celestino
|
|
|
|
Irã responsabiliza Ocidente por ciberataque, diz jornal
|
Notícias |
Notícias
|
|
|
|
Substituto pro FRAME
Quero substituir o abolido FRAME, mas não conheço nenhuma solução... |
Dreamweaver |
Adeivan
|
|
Publicidade
|
|

Help













