Replaced HttpUtility.UrlEncode with Uri.EscapeDataString and deleted the reference to the System.Web assembly. The System.Web assembly seems to be missing on some .NET 4.0 installations (and the overhead of using it is a bit large, just for the UrlEncode method).
1.1 --- a/GUI/CrashForm.cs Sat Oct 02 15:46:12 2010 +0000
1.2 +++ b/GUI/CrashForm.cs Sat Oct 02 18:15:46 2010 +0000
1.3 @@ -36,13 +36,9 @@
1.4 */
1.5
1.6 using System;
1.7 -using System.Collections.Generic;
1.8 -using System.ComponentModel;
1.9 -using System.Drawing;
1.10 using System.IO;
1.11 using System.Net;
1.12 using System.Text;
1.13 -using System.Web;
1.14 using System.Windows.Forms;
1.15
1.16 namespace OpenHardwareMonitor.GUI {
1.17 @@ -88,11 +84,11 @@
1.18 request.ContentType = "application/x-www-form-urlencoded";
1.19
1.20 string report =
1.21 - "type=crash&" +
1.22 - "version=" + HttpUtility.UrlEncode(version.ToString()) + "&" +
1.23 - "report=" + HttpUtility.UrlEncode(reportTextBox.Text) + "&" +
1.24 - "comment=" + HttpUtility.UrlEncode(commentTextBox.Text) + "&" +
1.25 - "email=" + HttpUtility.UrlEncode(emailTextBox.Text);
1.26 + "type=crash&" +
1.27 + "version=" + Uri.EscapeDataString(version.ToString()) + "&" +
1.28 + "report=" + Uri.EscapeDataString(reportTextBox.Text) + "&" +
1.29 + "comment=" + Uri.EscapeDataString(commentTextBox.Text) + "&" +
1.30 + "email=" + Uri.EscapeDataString(emailTextBox.Text);
1.31 byte[] byteArray = Encoding.UTF8.GetBytes(report);
1.32 request.ContentLength = byteArray.Length;
1.33
2.1 --- a/GUI/ReportForm.cs Sat Oct 02 15:46:12 2010 +0000
2.2 +++ b/GUI/ReportForm.cs Sat Oct 02 18:15:46 2010 +0000
2.3 @@ -36,13 +36,10 @@
2.4 */
2.5
2.6 using System;
2.7 -using System.Collections.Generic;
2.8 -using System.ComponentModel;
2.9 using System.Drawing;
2.10 using System.IO;
2.11 using System.Net;
2.12 using System.Text;
2.13 -using System.Web;
2.14 using System.Windows.Forms;
2.15
2.16 namespace OpenHardwareMonitor.GUI {
2.17 @@ -76,11 +73,11 @@
2.18 request.ContentType = "application/x-www-form-urlencoded";
2.19
2.20 string report =
2.21 - "type=hardware&" +
2.22 - "version=" + HttpUtility.UrlEncode(version.ToString()) + "&" +
2.23 - "report=" + HttpUtility.UrlEncode(reportTextBox.Text) + "&" +
2.24 - "comment=" + HttpUtility.UrlEncode(commentTextBox.Text) + "&" +
2.25 - "email=" + HttpUtility.UrlEncode(emailTextBox.Text);
2.26 + "type=hardware&" +
2.27 + "version=" + Uri.EscapeDataString(version.ToString()) + "&" +
2.28 + "report=" + Uri.EscapeDataString(reportTextBox.Text) + "&" +
2.29 + "comment=" + Uri.EscapeDataString(commentTextBox.Text) + "&" +
2.30 + "email=" + Uri.EscapeDataString(emailTextBox.Text);
2.31 byte[] byteArray = Encoding.UTF8.GetBytes(report);
2.32 request.ContentLength = byteArray.Length;
2.33
3.1 --- a/OpenHardwareMonitor.csproj Sat Oct 02 15:46:12 2010 +0000
3.2 +++ b/OpenHardwareMonitor.csproj Sat Oct 02 18:15:46 2010 +0000
3.3 @@ -61,7 +61,6 @@
3.4 <Reference Include="System.Data" />
3.5 <Reference Include="System.Drawing" />
3.6 <Reference Include="System.Management" />
3.7 - <Reference Include="System.Web" />
3.8 <Reference Include="System.Windows.Forms" />
3.9 <Reference Include="System.Xml" />
3.10 <Reference Include="Aga.Controls, Version=1.7.0.0, Culture=neutral, PublicKeyToken=fcc90fbf924463a3">