Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim disk As ManagementBaseObject
Dim strResult As String
Dim diskClass = New ManagementClass("Win32_LogicalDisk")
Dim disks As ManagementObjectCollection
disks = diskClass.GetInstances()
For Each disk In disks
strResult = ""
strResult += "设备ID:" & disk("DeviceID") & vbCrLf
strResult += "磁盘名称:" & disk("Name") & vbCrLf
strResult += "磁盘卷标:" & disk("VolumeName") & vbCrLf
If disk("FileSystem") <> "" Then strResult += "文件系统:" & disk("FileSystem") & vbCrLf
strResult += "磁盘描述:" & disk("Description") & vbCrLf
If System.Convert.ToInt64(disk("Size")) > 0 Then
strResult += "磁盘大小:" & System.Convert.ToInt64(disk("Size").ToString()) & vbCrLf
strResult += "磁盘类型:" & System.Convert.ToInt16(disk("DriveType").ToString())
End If
it is probably very simple, try to add a setting for the CD key in the web.config, try to read it in Application_Start in global.asax, if somehow the CD key provided doesn't satisfy your algorithm, try to crash the AppDomain by throwing an exception (never tried, not sure if it works)