When using external .Net assemblies, the customer may receive the following issues if trying to use the classes related to the Web requests:
- The type or namespace name 'HttpWebRequest' could not be found (are you missing a using directive or an assembly reference?)
- The name 'WebRequest' does not exist in the current context.
In case the abovementioned types of errors are present when trying to save and run the script, please pass the namespace which includes the
HttpWebRequest class into the script module.
The actual namespace for the
System.Net, so in the code it should be included as follows:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("");
Additionally, make sure the necessary assembly is added on the .Net Reference tab:
If it is not available, please add it using the Add… button and inserting the following string reference:
System.Net.Http, Version=184.108.40.206, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a