Tuesday, 17 January 2012

.NET bases applications are slow to load or certain in-app tasks are slow

This behaviour will occur with any .NET 1.1 and 2.0 assembly that is authenticode-signed, not only Measurement Studio assemblies. Digital signing is also referred to as code signing. Code signing a .NET library is strongly recommended by Microsoft, and Measurement Studio signs all of our ActiveX and .NET components.

Code signing of assemblies makes components tamper-proof and ensures that you know the identity of the component publisher.

The reason why this problem is occurring is because of the mechanism used by the .NET Common Language Runtime (CLR) to verify code-signed .NET assemblies. Part of the verification process requires an online look-up to check whether the certificate with which the assembly is signed has been revoked and is no longer valid. Windows does this by downloading a CRL (Certificate Revocation List). The first time a code-signed assembly is loaded by the .NET CLR, the CRL is downloaded from the certificate provider's server and cached on the system.

When the .NET CLR loads a code-signed assembly and is unable to reach the CRL distribution point, it records the failure as an inability to provide the assembly evidence that it was code-signed. So the assembly is allowed to load, but is not marked as being digitally signed. There is a 15 second delay for CRL retrievals. This is how long the CLR will keep on re-trying to download the CRL before it finally times out. So the delay in loading the .NET assembly occurs because Windows is unable to download the CRL and keeps trying to download it for 15 seconds before timing out.

This behavior is by design.

The .NET CLR will not indicate any error or throw any security exception when verifying a signed assembly if the CRL distribution point cannot be reached. An error here from 
WinVerifyTrust(), the API used by the .NET CLR to verify a code signed assembly, prevents the assembly from being marked as code signed. Note that this does not apply to assemblies loaded thru the Internet Explorer hosting interface.

You could manually download the CRL and install it on your system. But the CRL is valid only for 10-15 days, so unless your system is able to update the file after this time, you will run into the same problem again.

Microsoft recommends disabling CRL checking as a workaround by disabling this option in Internet Explorer. Use the following steps to disable the CRL checking in Internet Explorer:
  1. Select Start»Control Panel
  2. Double-click Internet Options
  3. Select the Advanced tab. 
  4. In the Security section, uncheck the Check for publisher's certificate revocation option.
By disabling the CRL checking using the Internet Options, you are not exposing yourself to a security threat because this check is not working. The reason why this problem is showing up is because your network settings are not allowing Windows to access the CRL.

In addition, it is possible to programmatically set the CRL verification. When the 
Check for publisher's certificate revocation is unchecked, a setting in the registry is changed. To turn off CRL verification, set HKCU\Software\Microsoft\Windows\CurrentVersion\WinTrust\Trust Providers\Software Publishing\State  from 0x00023c00 to 0x00023e00. To turn CRL Checking on again, reset the State key to 0x00023c00

Disabling IPv6 in Windows 2008

Unticking IPv6 in the NIC settings only disables IPV6 for that NIC. This does not apply to sudo NIC like Intra-Site Automatic Tunnel Addressing Protocol (ISATAP), 6to4 and Teredo. To disable this to the system open and CMD prompt with elevated privileges and execute this command:


reg add hklm\system\currentcontrolset\services\tcpip6\parameters /v DisabledComponents /t REG_DWORD /d 4294967295


Further reading: http://support.microsoft.com/kb/929852

Friday, 6 January 2012

Disabling network offloading in Windows

There is some useful info on offloading on this website www.windowsitpro.com/article/networking/give-microsofts-scalable-networking-pack-140350
But in my opinion it is still best to disable offloading. One example is the Microsoft Small Business Server best practices analyser recommends it, now why would Microsoft do this if it was not for the best.


To Determine the current state of offloading on the system issue these commands:


netsh int ip show global
netsh int tcp show global


To disable offloading issue these commands:

netsh int tcp set global rss=disabled
netsh int ip set global taskoffload=disabled
netsh int tcp set global autotuning=disabled
netsh int tcp set global congestion=none
netsh int tcp set global chimney=disabled

Remember this only disables offloading within the OS kernal, NOT the NICs! You can use the BACS control suite or the Intel driver options to disable this on the adapter.

Thursday, 15 December 2011

Montoring ESXi with SNMP

Open ESXCLI from your PC.


vicfg-snmp.pl --server 10.0.x.x --u root --p youresxipassword --comm PUBLIC
vicfg-snmp.pl --server 10.0.x.x --u root --p youresxipassword  --enable

vCentre SYSPREP file downloads and locations

Sysprep 1.1 files
Location: C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\1.1 


or:
C:\ProgramData\VMware\VMware vCenter Converter Standalone\sysprep\1.1
Download: [download]
Instructions: Extract the EXE download and copy the contents of the tools folder to the 1.1 folder.
Windows 2000
Location: C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\2k


or:
C:\ProgramData\VMware\VMware vCenter Converter Standalone\sysprep\2k
Download: [ SP4 download]
Instructions: Extract the EXE download and then open this file: i386\deploy.cab. Copy the contents of the file to the 2k folder.
Windows 2003
Location: C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\svr2003

or:
C:\ProgramData\VMware\VMware vCenter Converter Standalone\sysprep\svr2003
Download: [SP2 download]
Instructions: Run the EXE and then open this file: c:\windows\system32\deploy.cab. Copy the contents to the svr2003 folder.
Windows 2003 x64
Location: C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\svr2003-64


or:
C:\ProgramData\VMware\VMware vCenter Converter Standalone\sysprep\svr2003-x64
Download: [SP2 download]
Instructions: Extract the contents of the EXE and then extract the file SP2QFE\deploy.cab. Copy those files to the svr2003-64 folder.
Windows XP
Location: C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\xp


or:
C:\ProgramData\VMware\VMware vCenter Converter Standalone\sysprep\xp
Download: [SP2 download]
Instructions: Open the CAB file download and copy the contents to the xp folder.
Windows XP x64
Location: C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\xp-64


or:
C:\ProgramData\VMware\VMware vCenter Converter Standalone\sysprep\xp-64
Download: [SP2 download]
Instructions: Extract the contents of the EXE and then extract the file SP2QFE\deploy.cab. Copy those files to the xp-64 folder.

VMWare VMKernal ports and over subscription with Equallogic SANs

Previously it was possible to assign multiple VMkernel ports to physical nics. This was called over subscribing and was done to attempt to obtain more bandwidth for the environment especially when the ESX server had 10Gb nics and the SAN was running multiple 1Gb ports. Dell and VMware have changed the support for this practice and now only recommend using a 1:1 VMkernel binding process as described in this updated technical report.



Wednesday, 14 December 2011

Error: "Initiator wanted to skip security phase but we cannot." or "Initiator tried to bypass the security phase but we cannot."

This gets me every time I setup an EQL box.


Error: "Initiator wanted to skip security phase but we cannot." or "Initiator tried to bypass the security phase but we cannot."


To fix this open the EQL GUI web interface. Click the iSCSI tab and click Prevent unauthorised hosts from discovering targets.