简体   繁体   English

如何在Windows Server 2008 R2 Enterpresi和.NET中的Web应用程序上设置TLS证书?

[英]How can I setup TLS certificate on Windows Server 2008 R2 Enterpresi and Web application in .NET?

Good Morning 早上好

I would like your help. 需要您的帮助。 First all I want to say that I am new in .NET and I want to learn daily. 首先,我想说我是.NET的新手,我想每天学习。

I have one web application that connects to a Gateway to process payments. 我有一个连接到网关以处理付款的Web应用程序。 The company that manages the gateway changes their TLS certificate to TLS 1.2 and now I need to change this on the server and maybe in the web application was developed using .NET (C# code). 管理网关的公司将其TLS证书更改为TLS 1.2,现在我需要在服务器上进行更改,也许在Web应用程序中是使用.NET(C#代码)开发的。

I research and I spent more time to discover How can I do that but really I don't find a clear example where should I make exactly the changes? 经过研究,我花了更多时间发现该怎么做,但实际上我没有找到明确的示例,我应该在哪里进行确切的更改?

I found in stackoverflow this link " TLS 1.2 in .NET Framework 4.0 " and I'm following the instruction but I don't have clear in the code Should I implement the changes?. 我在stackoverflow中找到此链接“ .NET Framework 4.0中的TLS 1.2 ”,我正在按照说明进行操作,但是代码中没有明确说明是否应该实施更改?

Please, I appreciate any suggestions. 请,我感谢任何建议。

Also, I would like to share some information that could be relevant in my case. 另外,我想分享一些与我的情况相关的信息。

Details. 细节。 Case: From March I can not process payments. 案例:从三月开始,我无法处理付款。

Other information 1. I read some links but it hard to me change the code because in production I have a compiled version. 其他信息1.我阅读了一些链接,但是我很难更改代码,因为在生产中我具有编译版本。 2. I can not compile from the Dev environment because these are not the same version. 2.我不能从Dev环境进行编译,因为它们不是同一版本。 **I have a source but unfortunately, the version in production is different with the version in production. **我有消息来源,但不幸的是,生产版本与生产版本不同。 3. where should I change the TLS in production environment?. 3.在生产环境中应该在哪里更改TLS?

about technical information. 关于技术信息。 1. I am using .NET 4.0 - Windows Server 2008 Enterprise - SQL Server 2008. 2. I reviewed the regedit for the vars that mention in the link above and I can see the vars; 1.我正在使用.NET 4.0-Windows Server 2008 Enterprise-SQL Server2008。2.我查看了上面链接中提到的var的regedit,可以看到这些var。 then I could say that I have ready setup the vars according to TLS 1.2. 那么我可以说我已经准备好根据TLS 1.2设置vars。 3. The last Friday I restarted the server but I continue with the problem. 3.上一个星期五,我重新启动了服务器,但问题仍然存在。

Thanks 谢谢

REG. REG。

I am using .NET 4.0 - Windows Server 2008 Enterprise - SQL Server 2008. 2. I reviewed the regedit for the vars that mention in the link above and I can see the vars; 我正在使用.NET 4.0-Windows Server 2008 Enterprise-SQL Server2008。2.我查看了上面链接中提到的var的regedit,可以看到这些var。 then I could say that I have ready setup the vars according to TLS 1.2. 那么我可以说我已经准备好根据TLS 1.2设置vars。 3. The last Friday I restarted the server but I continue with the problem. 3.上一个星期五,我重新启动了服务器,但问题仍然存在。

Install Windows updates on the server, make sure to install a newer version of the .NET Framework such as 4.5 (via Windows update or here and here ). 在服务器上安装Windows更新,请确保安装更高版本的.NET Framework,例如4.5(通过Windows Update或here and here )。 A newer certificate might require you to install Windows updates or installing an additional certificate to the certificate store in order for it to be accepted. 较新的证书可能需要您安装Windows更新或在证书存储中安装其他证书,才能被接受。 Review IIS AppPool settings and make sure it is actually running at least .NET 4.0. 查看IIS AppPool设置,并确保它实际上至少在运行.NET 4.0。

when I was hired here I found old sources vs the current version in production plus the version in production is compiled 当我在这里被雇用时,我发现旧资源与生产中的当前版本以及生产中的版本已编译

Since you have at least a portion of the source code you have to ask yourself (and your boss) the difficult question whether or not you should rewrite the lost parts or try to recover some of it by copying pages from the production environment to your development enviroment and using a decompiler such as dotPeek , justdecompile and ILSpy . 由于您至少有部分源代码,因此您必须问自己(和老板)这个难题:您是否应该重写丢失的部分或尝试通过将页面从生产环境复制到开发中来恢复丢失的部分?环境,并使用诸如dotPeekjustdecompileILSpy之类的反编译器。 Both options involve a lot of manual work, mostly because recovery via decompilation is not perfect and is going to produce many errors, a rewrite on the other hand is very costly because of the time involved. 两种选择都涉及大量的手动工作,主要是因为通过反编译进行的恢复并不完美,并且会产生许多错误,而另一方面,由于涉及时间的原因,重写操作非常昂贵。

Secondly you should immediatly setup a version control system by using modern tools such as git. 其次,您应该使用git等现代工具立即设置版本控制系统。 There are many offers available on the internet that allow you to host private source code for a small fee or completly free (eg Bitbucket , GitLab , among others). 互联网上有很多优惠,使您可以支付少量费用或完全免费(例如BitbucketGitLab )来托管私人源代码。

Once you have decided wether or not you are going to recover or rewrite you can use the source code that you already have as a baseline. 一旦决定是否恢复或重写,就可以使用已有的源代码作为基准。 Try to add some changes from the decompiled sources and pages from production or begin to rewrite parts of the most crucial features and iterate. 尝试在反编译的源代码和生产页面中添加一些更改,或者开始重写最关键功能的某些部分并进行迭代。

If not done already try to install a SQL Server Express and tools on your development machine and copy the structure of the tables from the production environment so that the current (old) version will start on your development machine and you can verify that it works locally without the need of the production environment. 如果尚未完成,请尝试在开发计算机上安装SQL Server Express和工具,并从生产环境中复制表的结构,以便当前(旧)版本将在开发计算机上启动,并且您可以验证其在本地是否可以运行无需生产环境。

You should also verify if you can install Windows updates and newer versions of the .NET Framwork and IIS so that your development machine and the production environment run roughly the same version of the .NET Framework. 您还应该验证是否可以安装Windows更新以及.NET Framwork和IIS的较新版本,以便您的开发计算机和生产环境运行与.NET Framework大致相同的版本。 Microsoft offers advice on which versions are supported by which operating system here , If you are using an old version of IIS, version 10 can be found here . 在其版本由该操作系统支持微软提供的意见在这里 ,如果你使用的是旧版本的IIS,版本10,可以发现在这里

If the certificate used by the payment gateway is too new, it could also be the case that you need to install Windows updates or an additional certificate to the windows certificate store. 如果付款网关使用的证书太新,则可能是您需要将Windows更新或其他证书安装到Windows证书存储中。

Furthermore I would suggest that you setup your development machine so that you can test the payment gateway (eg with a fake product). 此外,我建议您设置开发机器,以便测试付款网关(例如,使用假冒产品)。 Try to imitate the most crucial parts and make sure the .NET version you are developing locally is compatible with version constraints of your IIS version. 尝试模仿最关键的部分,并确保本地开发的.NET版本与IIS版本的版本限制兼容。

Alternatively try to setup a minimal development environment on the production environment eg using SharpDevelop or LinqPad and write a little bit of C# code that you can quickly execute to see if you fixed it. 或者,尝试在生产环境上设置最小的开发环境,例如使用SharpDevelopLinqPad并编写一些C#代码,您可以快速执行这些代码以查看是否已对其进行修复。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 WebRequest针对Windows Server 2008 R2的TLS 1.2进行故障转移 - WebRequest fails over TLS 1.2 for Windows Server 2008 R2 Windows Server 2008 R2无法识别x509证书 - x509 certificate not recognized in Windows server 2008 R2 如何使用sap,sql server 2008 r2和.net框架为.net项目创建设置 - how to create a setup for .net project with sap, sql server 2008 r2 and .net framework 如何在SQL Server 2008 R2中复制行 - How can i copy a row in sql server 2008 r2 部署使用Asp.Net,C#和Sql Server 2008 R2构建的Web应用程序 - Deploying an Web Application built using Asp.Net,C# and Sql Server 2008 R2 在IIS 7.5(Windows 2008 R2)上部署Web应用程序 - Deploying a Web Application on IIS 7.5 (Windows 2008 R2) 在 Windows Server 2012 R2 上构建的应用程序在 Windows Server 2008 R2 上失败 - Application built on Windows Server 2012 R2 fails on windows server 2008 R2 Windows Server 2008 R2中未运行quartz.net作业 - quartz.net job not running in windows server 2008 R2 如何在Windows 2008 R2和Windows 7上以编程方式启用Application Server角色 - How to enable Application Server role programmatically on Windows 2008 R2 and Windows 7 asp.net中Windows Server 2008 R2上的PDF缩略图 - PDF Thumbnails on windows server 2008 R2 in asp.net
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM