Hi! A doubt !
My code is working , but sometimes i get the error 500. I don't know why it works and in other time give me error.
My web config :
<customErrors defaultRedirect="url" mode="RemoteOnly">
<error statusCode="400" redirect="400.aspx"/>
<!-- Bad Request-->
<error statusCode="404" redirect="404.aspx"/>
<!-- Página de erro-->
<error statusCode="500" redirect="500.aspx"/>
<!-- Erro no servidor-->
</customErrors>
My contact form , sometimes after submit the email return error 500
<asp:Button ID="Button2" class="buttme" Text="Enviar" OnClick="SendAsyncEmail" runat="server" />
Dim email As New Thread(Sub() SendEmail([to], from, password, subject, bodycont))
email.IsBackground = True
email.Start()
'Display success message and clear the form.
Dim message As String = "Seu e-mail foi enviado com sucesso. Aguarde contato nas próximas horas."
Dim script As String = "window.onload = function(){ alert('"
script &= message
script &= "');"
script &= "window.location = '"
script &= Request.Url.AbsoluteUri
script &= "'; }"
ClientScript.RegisterStartupScript(Me.GetType(), "SuccessMessage", script, True)
And here also , sometimes when i click calls the page, but sometimes error 500
<a href="Models/GramadoHotel/home.aspx" class="btn btn-default custom-btn download-btn"> <span class="fa fa-external-link-square" aria-hidden="true"></span>
