<system.webServer> <rewrite> <rules> <clear /> <rule name="Redirect to https" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{HTTPS}" pattern="off" ignoreCase="true" /> </conditions> <action type="Redirect" url="https://seudominio.com.br" redirectType="Permanent" appendQueryString="false" /> </rule> </rules> </rewrite> </system.webServer>
ASP.NET Calling WebMethod with jQuery AJAX "401 (Unauthorized)" Inside ~/App_Start/RouteConfig.cs change: settings.AutoRedirectMode = RedirectMode.Permanent; To: settings.AutoRedirectMode = RedirectMode.Off; Fonte: https://stackoverflow.com/questions/23033614/asp-net-calling-webmethod-with-jquery-ajax-401-unauthorized
Para usar o AutoCompleteExtender e ter mais um valor de variável para o método, deve se criar uma textbox ou algum controle para receber seu parâmetro como a seguir. no arquivo aspx: // Cria o campo para receber <asp:HiddenField ID="hf"…
In this article I will explain how to display ASP.Net AJAX UpdateProgress control in center or middle of page with a modal background covering the whole screen. Until the AJAX call is in progress, the screen will freeze and user…
Isso acontece porque você está provavelmente modificando controles de servidor (com runat="server") no cliente dinamicamente, ou está enviando o form mas não do botão "esperado" pelo ASP.NET, ou seja, não de um script que tenha sido registrado para validação. Você…
Para usuários que estão com o mesmo problema e estão usando versões antigas do .net, sugiro tentarem adicionar a linha a seguir. ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls fonte: https://pt.stackoverflow.com/questions/215319/httpclient-webexception-a-conex%C3%A3o-subjacente-estava-fechada-a-conex%C3%A3o-foi-fe
HttpWebResponse response = null; var request = (HttpWebRequest)WebRequest.Create(/* url */); request.Method = "HEAD"; try { response = (HttpWebResponse)request.GetResponse(); } catch (WebException ex) { /* Uma WebException será acionada se o código não for 200 ( OK) */ } finally {…
O response.redirect esta gerando erro e não abrindo a página requisita. Abaixo a olução e a fonte. The correct pattern is to call the Redirect overload with endResponse=false and make a call to tell the IIS pipeline that it should…
/// /// Validando se o formato é de email /// /// private bool ValidaEmail() { // Math email; var email = Regex.Match(txtEmail.Text, @"^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$"); if (email != null) { return true; } else return false; }