停用后的问题IIS 6上的TLS 1.0(Windows Server 2008r2)
取消激活我们的Web服务器上的TLS 1.0以使用TLS 1.2。之后,该网站在交易时确实存在问题。我试着像停用后的问题IIS 6上的TLS 1.0(Windows Server 2008r2)
- 安装不同的东西所有悬而未决的Windows更新
- 升级IIS 6〜7版
- 重新编译整个项目为4.5和重新导入它在IIS
- 停用.NET 3特点在IIS
- 更新所有项目的目标框架,以4.5
- 控制的应用程序池,并将其设置为V4.0(它应该使用4.5)
首先它看起来像是应用程序的问题。但后来我在VS的调试模式下尝试项目,一切工作?与回退到SSL3而不是使用TLS 1.1或TLS 1.2的服务器相比。 (好像有缺少一些功能和通过的Technet命名的注册表项是不够的。)
我想问题也能像
(HttpApplication.cs)
-
使用某些类的
- 的System.Web
- System.Web.Security
由于缺乏经验,我得出的结论要问你这个问题。你有没有更多的想法?
刚刚想到的其他一些东西:VS中有一个项目使用.NET 4.0。我改变了目标框架,然后项目确实遇到了一些问题,以找到一些命名空间。 (目前所有项目都有相同的目标框架(.Net))。命名空间确实存在,但VS无法找到它。所以我重建,清理解决方案,但它没有帮助。然后我关闭VS并重新打开它。突然间这个项目奏效了。该属性中的框架为4.0。 (也许这也可能是一个问题?)
由于我受到时间的压力,我很感激任何帮助。
编辑:有没有简单的方法来测试(TLS测试)和显示使用的.Net版本?
EDIT2:找到了一个解决方案,用nuget包测试出框架。 http://haacked.com/archive/2010/12/05/asp-net-mvc-diagnostics-using-nuget.aspx/ (稍后会尝试)
我还设法通过远程调试逐步完成断点,并找到发生故障的位置。有一个文件“References.cs”这个头:
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18034
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.18034.
//
#pragma warning disable 1591
其中该代码创建的问题:
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace="http://....", ResponseNamespace="http://....", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
[return: System.Xml.Serialization.XmlElementAttribute("out", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public PaymentResult SelectPayment([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] uint merchantID, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string mdxi, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string getDataURL, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string tid) {
object[] results = this.Invoke("SelectPayment", new object[] {
merchantID,
mdxi,
getDataURL,
tid});
return ((PaymentResult)(results[0]));
}
对象“结果”从来没有得到的值。我按下F1,看看有什么调用正在做与本网站打开:https://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k(System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke);k(SolutionItemsProject);k(TargetFrameworkMoniker-.NETFramework,Version%3Dv4.5);k(DevLang-csharp)&rd=true
EDIT3:这似乎是调用是参考
System.Web.Services
但在该项目的版本是
运行时版本:v4.0.30319 版本:4.0.0.0
我觉得这是问题,因为它应该是4.5 ...
System.Net.WebException:基础连接已关闭:在发生意外的错误发送。 ---> System.IO.IOException:由于远程方关闭了传输流,认证失败。
我终于能够解决这个问题。我所做的就是增加一些的try-catch方法
try
{
result = SelectPayment(...);
}
catch (System.Web.Services.Protocols.SoapException e)
{
Logger.Error("[SelectPayment]: Can't Invoke XML Web service method synchronisly using " + e);
}
catch (System.InvalidOperationException e)
{
Logger.Error("[SelectPayment]: Can't Invoke XML Web service method synchronisly using " + e);
}
return result;
返回之前看到确切的错误信息
System.IO.IOException:身份验证失败,因为远程方已关闭传输流。
这是在Authentication failed because remote party has closed the transport stream
描述然后,我添加的代码中的HTTP上的SOAP调用之前这条线(SelectPayment的尝试前):
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
最后小时的节目做了之后工作! :)
这似乎是
运行时版本:v4.0.30319版本:4.0.0.0
使用总是TLS 1.0默认情况下,如果你不告诉他们,以使用TLS 1.2。从这个站点https://forums.iis.net/t/1189663.aspx?TLS+1+1+or+1+2+on+IIS6+Win2003+
为IIS6
进口信息IIS 7.5(Windows 7和Windows服务器2008 R2)是在MS平台的唯一的网络服务器,其支持TLS 1.1和TLS 1.2。
你的问题根本不清楚。你面临的问题是什么?请详细说明,如有异常(堆栈跟踪)等 –