HttpWebRequest throws “The specified registry key does not exist.”

Encountered a strange issue today, upon executing the following line of code, a “The specified registry key does not exist.” error was thrown.

A little googling reveals that the cause was a windows security update that was rolled out at work: MS12-074

Here’s a quote from the Microsoft KB article;

To enable the legacy functionality of WPAD, create the LegacyWPADSupport value in the following registry subkey:

Registry location: HKEY_LOCAL_MACHINESOFTWAREMicrosoft.NETFramework
DWORD (32-bit) Value name: LegacyWPADSupport
Value data: 1
The fix was to create the registry key with a value of 0.

Leave a Reply

Your email address will not be published. Required fields are marked *