我收到一个运行时错误“'SensionVB.CommonCall' 的类型初始化程序引发了异常。” 尝试实例化对象调用时:
Dim general As New SensionVB.CommonCall
当单步执行代码时,一旦遇到上述代码行并失败,它就会执行 .
微软的建议是检查空值,或者添加新的,在这种情况下都不是真的
SensionVB = Project CommonCall = 具有各种功能的公共类
Public Class CommonCall
Protected WithEvents litOne As System.Web.UI.WebControls.Literal
Public Shared sConnection As String = ConfigurationManager.ConnectionStrings("SerialStamperConnectionString").ConnectionString
Public Shared oConnection As New MySqlClient.MySqlConnection(sConnection)
Public Shared sMaxSerialNumber As String = "S000001"
Public Shared bLoggedin As Boolean = False
Public Shared iPageWidth As Integer = 1024
Public Shared isValidPassword As Boolean = False
Public Shared strCompanyID As String = ""
Public Shared strSecurityID As String = ""
Dim Response As New HttpResponse(HttpWriter.Null)
Const TimeOutInMinutes As Integer = 60
Const SiteTitle As String = "SensiOn"
Public Const PageWidth As Integer = 1250
Public SSOenabled As Boolean
Const SuperUserEmails As String = "super@domain.com"
Public Sub Initialize()
oConnection.Open()
End Sub