Category Archives: .Net

.Net 3.5 System.Web.UI.DataVisualization namespace does not exists

I was trying to compile an inherited VB .Net code that uses .Net 3.5 framework. When I compiled, it gave the following error The type or namespace name ‘DataVisualization’ does not exist in the namespace ‘System.Web.UI’ (are you missing an assembly reference?) Whatever answers I tried to find online could not give me details for […]


Weird errors for VB .Net classes defined in App_Code folder

Recently I was making a .Net 3.5 webforms application compile on my computer. The application was written in VB .Net. There were couple of classes which were causing weird issues. Visual Studio compiler generated “variable not declared”, “Exception not declared”, “End Sub does not have matching sub”, “line continuation character does not work in VB […]


How to run a single instance of WinForm application?

Following tutorial provides an example to run a single instance of WinForms application using Mutex. There are multiple ways to achieve the same result but this is kind of neat solution in my opinion. Add following SingleInstance class in your project. Here is how to use it in Program.cs > Main function

.Net

mailto Invalid URI: The hostname could not be parsed.

If the Uri is “mailto”, the Uri format must be in the following format. I encountered following error It was difficult to find the root cause. Finally I found that I used “&subject” (ampersand) for the first parameter instead of “?subject” (question mark). Once I used “?subject”, everything worked as expected.

.Net