小编use*_*041的帖子

如何使用htaccess文件仅将所有页面重定向到index.html,而不是重定向图像文件

如何使用htaccess文件将所有页面(仅限页面)重定向到index.html,而不是重定向图像文件.出于某种原因,我使用此代码并且index.html页面上的图像文件未显示.

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/index.html$
RewriteRule .* /index.html [L,R=302]
Run Code Online (Sandbox Code Playgroud)

.htaccess image

28
推荐指数
4
解决办法
7万
查看次数

出现ASP错误:邮箱不可用。服务器响应为:访问被拒绝-无效的HELO名称(请参阅RFC2821 4.1.1.1)

我遇到错误,我知道我的凭据是正确的。有任何想法吗?这是在Windows Server上,但我想为我的电子邮件使用Hostgator SMTP设置。这是我提交简单的联系表时发生的情况。

错误:邮箱不可用。服务器响应为:访问被拒绝-无效的HELO名称(请参阅RFC2821 4.1.1.1)

说明:执行当前Web请求期间发生未处理的异常。请查看堆栈跟踪,以获取有关错误及其在代码中起源的更多信息。

异常详细信息:System.Net.Mail.SmtpException:邮箱不可用。服务器响应为:访问被拒绝-无效的HELO名称(请参阅RFC2821 4.1.1.1)

源错误行61:

Line 59:            
Line 60:             SmtpClient smtp = new SmtpClient(SMTPServer, SMTPPort);
Line 61:             smtp.Credentials = new NetworkCredential(SMTPUserId, SMTPPassword);
Line 62:             smtp.Send(mail);
Line 63:         }
Run Code Online (Sandbox Code Playgroud)

源文件:\ Websites \ Client \ Reports \ ContactUs.aspx.cs行:61

================================================== =======================

我的源代码:

  protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        string name = txtFirstName.Text + " " + txtLastName.Text;
        string clientID = Session["CustomerID"].ToString();
        string message = txtMessage.Text;
        string email = txtEmail.Text;
        string company = txtCompany.Text;
        string phone = txtPhone.Text;

        SMTPMailHelper.SendMail(email, …
Run Code Online (Sandbox Code Playgroud)

c# asp.net smtp

2
推荐指数
1
解决办法
6070
查看次数

标签 统计

.htaccess ×1

asp.net ×1

c# ×1

image ×1

smtp ×1