What TLS protocol does Server.CreateObject("Msxml2.XMLHTTP.6.0") use? - iis

I'm using classic asp on IIS on Windows server 2012, and Server.CreateObject("Msxml2.XMLHTTP.6.0") to make soap requests against a payment processor, and "suddenly" it stopped working.
The payment processor has disabled TLS 1.0, we're supposed to do TLS 1.1 or 1.2; I think this is the cause of the problem...
How do I see and if needed change which protocol it uses?

Take a look here: https://learn.microsoft.com/en-us/dotnet/framework/network-programming/tls#systemdefaulttlsversions - specifically at sections SystemDefaultTlsVersions and SchUseStrongCrypto. You should also go ahead and disable all insecure ciphers/protocols/key exchanges in SChannel - the windows component responsible for SSL/TLS.
There is a GUI tool called IISCrypto from a company called Nartac that has some common profiles that are (somewhat) safer than editing the registry directly for disabling various obsolete components. see https://www.nartac.com/Products/IISCrypto.
Word of warning - be careful with your SChannel settings (either editing the registry or using IIS Crypto) - the settings are used throughout windows and are required for services like RDP and WinRM among other things - backup first, then test carefully.

I had similar situation - I have used Msxml2.XMLHTTP for API endpoint call in VB script and suddenly it stopped working. I got error "The system cannot locate the resource specified" and http.status returned 12029. The problem was not in the URL, it worked when I tried to call the URL from the browser. But when I started VB script, it has failed on the line http.send.
How I solved it finally?
I hade to install recommended update to my Windows Server 2012:
Microsoft .NET Framework 4.8 for Windows Server 2012 for x64 (KB4486081)
and I have installed one optional update too:
Internet Explorer 11 for Windows Server 2012 for x64
After this and server restart it started to work again. I can use both: "Msxml2.XMLHTTP.6.0" or "Msxml2.XMLHTTP", it does not matter.

Related

Enabling IIS with Advanced Installer

I've created install-shield using Advance Installer. One of the features that my install-shield enabling is IIS.
I'm using this shield on customer's servers to check if required software is installed. If the software is not installed install-shield will install it.
IIS is among those software.
I'm not shure how this IIS enabling is working. When no IIS is present on the machine install-shield enables it flawesly. But when it already enabled what happens then? Does install-shield will pass through without any action or it will enable the basic IIS features (features that would be enabled if the IIS were not existed).
I'm afraid to use this install-shield on customer server (where IIS is already installed) because I don't know what it will do. I'm afraid it will disable some IIS features that will affect the current server working state. I don't want to take any chances, I have to know if the install-shield just skips the IIS installation when it already installed or doing something else.
Thank you.
You should use the predefined support to install Windows Feature Bundles.
Using this support you can easily select which OS feature should be enabled and also set custom conditions. On our YouTube channel you can find examples/tutorials:
in the following example you see exactly how IIS is configured for enabling
here is also a more generic video, with a walkthrough over the built-in support from Advanced Installer for enabling Windows Features
Also, here is related topic on StackOverflow that might interest you.

HTTP Error 404.17 - Not Found (.Net 4)

I've just got a new server setup on Windows 2008 Web edition. I'm trying to set the first asp.net 4 application up on it but am having nothing but problems.
The latest is that I'm getting the 404.17 error, which says "the requested content appears to be script and will not be served by the static file handler.".
I've done a lot of research on google but most suggestions seem to be to run aspnet_regiis -i to install asp.net 4. I've done this several times both on the Framework and Framework64 folders, but with no success.
I tried changing from the default application pool to a .net4 application pool, which appeared to work at first and I instead got a server error to do with permissions. I fixed that, and immediately the 404.17 error returned.
Other suggestions I've read say to go into the "turn windows features on and off" and make sure .net 4 is selected there under IIS. However on this server clicking "turn windows features on and off" takes me to the standard windows 2008 server manager. I click "add features" there, and only ".NET Framework 3.0 Features (Installed)" is listed and selected. .NET 4 isn't shown there, yet it is selectable through the application pools.
What else can I try to get the website running as I'm at a complete loss now. Its annoying because my old server was easy to manage - I did it all through the server itself without a control panel (Windows 2003), now on my new server I have to manage most of it through Plesk because there is no dns.
Any help would be much appreciated.
I too had the same problem but solved it with simple solution. My program was in framework 4.0 but in application pool was mapped to framework 2.0.
Just changed the frame work in application pool to 4.0.
It worked.
I've finally figured out the problem, and it was to do with Plesk itself.
After delving through some of the thousands of links throughout the plesk control panel I found a page for "Website Scripting and Security". Under there it was set to .NET 2.0. However, even though I'd installed .NET 4 on the server, Plesk didn't know about it. Although the application pool I'd set the website to run under through IIS was .NET 4, it still wouldn't work for some reason.
I then found another page under "tools and settings" for server components, and on that page is a refresh button. Hit that and it suddenly realised that .NET 4 was installed, went back to the website scripting and security page, selected .NET 4, and hey presto, I got a server error (never have I been so glad to see a server error).
I then just had to give the application pool identity read access to the web folder, and the website worked.
I wish I'd paid an extra £15 per month for Windows 2008 Standard edition now so I could manage it all manually without Plesk.
Ensure that you are running this application under a Virtual Directory, also ensure that your IIS has ASP, ASP.Net, ISAPI Extensions And Filters, Static Content installed.
Change the .net framework from 'plesk' panel:
go to Domains
select then domain
Go to 'Domain and Websites & Domains'
Hide Advanced Operations
Go to 'Asp.net Settings'
Go to 'Change Version'
select 4.0
If you don't have the 4.0 option then you must install the framework on your server first.

HTTP Error 404.3-Not Found in IIS 7.5

I'm using IIS 7.5 on Windows Server 2008 R2 x64 Enterprise Edition. In the project we have developed with ASP.NET 4.0 we used WCF Service. But it doesn't run over domain when the software is running from local computer. Otherwise, I am getting the following error:
HTTP Error 404.3-Not Found
The page you are requesting cannot be served because of the extension
configuration. If the page is script, add a handler. If the file should
be downloaded, add a MIME map.
You should install IIS sub components from
Control Panel -> Programs and Features -> Turn Windows features on or off
Internet Information Services has subsection World Wide Web Services / Application Development Features
There you must check ASP.NET (.NET Extensibility, ISAPI Extensions, ISAPI Filters will be selected automatically). Double check that specific versions are checked. Under Windows Server 2012 R2, these options are split into 4 & 4.5.
Run from cmd:
%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir
Finally check in IIS manager, that your application uses application pool with .NET framework version v4.0.
Also, look at this answer.
In my case, along with Mekanik's suggestions, I was receiving this error in Windows Server 2012 and I had to tick "HTTP Activation" in "Add Role Services".
In windows server 2012, even after installing asp.net you might run into this issue.
Check for "Http activation" feature. This feature is present under Web services as well.
Make sure you add the above and everything should be awesome for you !!!
I was having trouble accessing wcf service hosted locally in IIS. Running aspnet_regiis.exe -i wasn't working.
However, I fortunately came across the following:
Rahul's blog
which informs that servicemodelreg also needs to be run:
Run Visual Studio 2008 Command Prompt as “Administrator”.
Navigate to C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation.
Run this command servicemodelreg –i.

WIX and IIS7: Cannot connect to Internet Information Server. (-2147221164)

I have seen
WiX and iis (cannot connect to internet information server)
This question is different.
I have Windows7, IIS is installed. I'm trying to run an MSI installer built with WIX v3.0 to install an ISAPI filter.
When I run the MSI I get
Cannot connect to Internet Information Server. (-2147221164 )
...in the msi log file, and an accompanying error message like Error 26001.
In his response to the other WIX/IIS7 question, Yan Sklyarenko
said:
the WiX IIsExtension (the one which defines WebSite element) uses the API of IIS component to actually do its job. For WiX v3.0 it even requires IIS 6 compatibility to be turned ON in IIS 7 in order to work correctly.
I suppose the reason that I saw the error message is that the IIS6 compat stuff is not installed.
Is this pre-requisite still present in Wix v3.5? In other words, using Wix3.5, must I still have the IIS6 compatibility stuff installed, to use IisExtension ?
No, WiX v3.5 supports IIS7 directly.
-2147221164 decimal converts to 0x80040154 hex. A google search for "wix 0x80040154 brings up the following thread:
Error 0x80040154: failed to get IID_IIMSAdminBase object with IIS 7
So yes, this error code is a COM registration error associated with the management objects not being present. The solution is either to gate the installer to not run if they aren't present or upgrade to an installation tool that supports native interaction.

How to disable verification of Authenticode signature for a .NET 1.1 assembly?

My question is this: How can I stop my .NET 1.1 application from trying to verify the digital signature in an environment where there is no access to the Internet?
Background to my question:
I have a product installed at a customer which is based on .NET 1.1 SP1. The customer site has no access to the Internet. This causes a delay in application startup which in some cases causes my Windows services to fail to start because they time out.
The delay when starting appears to be caused by the app attempting to verify the digital signature. This is well documented in other posts and the normal answer is to include generatePublisherEvidence=false in the app.config file, as documented here http://support.microsoft.com/kb/936707
It seems that using generatePublisherEvidence=false doesn't make any difference to .NET 1.1 apps, which seems to agree with MSDN (http://msdn.microsoft.com/en-us/library/0kk0kk35(VS.71).aspx does not mention the element) and with the hotfix I mentioned above, which was released for .NET 2.0 apps.
My next release to the customer will be built on .NET 3.5 SP1 and I have no problems with using generatePublisherEvidence on that version of the .NET framework, but I currently cannot simply change the customer to that release - I am stuck with .NET 1.1 SP1 - so I'm looking for an answer other than to simply use a later version of the .NET framework.
I just solved this for a vendor-supplied application today. I assume that their application was written in .net, but I did not confirm. Since the subnet did not have internet access, I removed the DNS server entry from the TCP/IP settings on the local computers that have static addresses. For addresses supplied by DHCP, I removed the DNS server option (006) from the DHCP scope.

Resources