Exchange 2007和SSL身份验证 [英] Exchange 2007 and SSL authentication

查看:235
本文介绍了Exchange 2007和SSL身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从我的应用程序连接到托管的Exchange服务器时遇到了很多麻烦。我试图对需要NTLM身份验证的服务器使用System.Net.Mail。我一直在通过铃声试图解决这个问题并且看到了关于这是否可能的相反陈述。我读过的一些评论建议我需要回到System.Mail ...但我需要HTML电子邮件,所以不要相信这是一个选项。

I am having a ton of trouble connecting to a hosted Exchange server from my app. I am trying to use System.Net.Mail against a server that requires NTLM authentication. I have been through the ringer trying to work this out and have seen contrary statements about whether this is or is not possible. Some comments I have read suggest I need to move back to System.Mail... but I need HTML eMails so don't believe that's an option.

当我连接而未指定NTLM作为身份验证方法时,我收到"身份验证失败"。响应,这似乎是合理的,因为我的服务提供商告诉我他们期望NTLM身份验证。但是,当我切换到NTLM时,我收到错误,表明服务器没有响应(这看起来很奇怪)。

When I connect without specifying NTLM as the authentication method I received "authentication failed" responses, which seems reasonable since my service provider tells me they expect NTLM authentication. However, when I switch to NTLM I receive errors suggesting the server did not respond (which seems weird).

谁能告诉我这是否是一个我应该能够工作的场景?我正在运行Vista,将.Net Framework 3.0与Exchange 2007服务器连接起来。这是我的代码(至少是最新的迭代!)...

Can anyone tell me whether this is a scenario I should be able to get working? I am running from Vista, with .Net Framework 3.0 against an Exchange 2007 server. Here is my code (at least the latest iteration!)...

System.Net.NetworkCredential credentials = new System.Net.NetworkCredential(user_id,user_password);
SmtpClient smtp = new SmtpClient(" smtp.ihostexchange.net");
smtp.UseDefaultCredentials = false;
smtp.Credentials =(System。 Net.ICredentialsByHost)credentials.GetCredential(" smtp.ihostexchange.net",587," NTLM");
smtp.EnableSsl = true;
smtp.Send(message);

System.Net.NetworkCredential credentials = new System.Net.NetworkCredential(user_id, user_password);
SmtpClient smtp = new SmtpClient("smtp.ihostexchange.net");
smtp.UseDefaultCredentials = false;
smtp.Credentials = (System.Net.ICredentialsByHost)credentials.GetCredential("smtp.ihostexchange.net", 587, "NTLM");
smtp.EnableSsl = true;
smtp.Send(message);

谢谢。

标记

推荐答案


  • 您是否检查过您的托管服务提供商有关凭证,端口&认证?

  • 您是否通过使用相同的凭证,身份验证和电子邮件发送TELNET来测试发送电子邮件?您尝试使用System.Net.Mail发送电子邮件的机器端口?它的输出是什么?

  • 当您使用NTLM时,请确保这是否是有效的凭证?

  • 这不是关于使用Vista或.Net Framework;这都是关于提供正确的凭据和有效的身份验证,因此我们得到了这个错误。

  • Have you checked your Hosting provider regarding the credential, port & authentication?
  • Have you tested sending email via sending TELNET with the same credential, authentication & port from the machine, which you try to send email using System.Net.Mail? What's the output of that?
  • When you use NTLM, make sure whether this is a valid credential?
  • It's not about using Vista or .Net Framework; it's all about providing proper credentials and valid authentication, due to this we get this error.

请告诉我你的意见。
<希望这会有所帮助。

Let me know your input on this.

Hope this helps.


这篇关于Exchange 2007和SSL身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆