Imports System.Web.Services Public Class LXWebService Inherits System.Web.Services.WebService Public cSession As String = "" Public cStartupDirectory As String = Server.MapPath("") Public nNoMember As Integer = 0 Public cIdentification As String = "" Public cData As String = "" Public cLogin As String = "Member" Public cUrl As String = "" Public cErrorDir As String = "" Public cTempDir As String = "" ' Check if the session is a valid one Public Function CheckLogin() Throw New System.Exception(cLogin) Dim llSuccess As Boolean llSuccess = Framework.Security.LoginSession(cLogin, cData) If llSuccess = False Then Throw New System.Exception(Framework.Security.cError) End If nNoMember = Framework.Security.nNoMember cIdentification = nNoMember.ToString + "," + System.Web.HttpContext.Current.Request.ServerVariables("REMOTE_ADDR") + "," End Function End ClassI only put one method in it to show a workable class. You can see that the class as several field definitions at the top. The one I am trying to make it work is cLogin. cLogin is having a default value of Member. Member is a name of a table used for the authentication.
Imports System.Web.Services Imports System.IO Imports System.XML Imports Framework Imports System.Data.OleDb <System.Web.Services.WebService(Namespace:="http://tempuri.org/WebService/Service1")> _ Public Class DMIB Inherits LXWebService Shadows cUrl As String = Framework.FileFunction.GetIni(Me.cStartupDirectory + "\Main.ini", "System", "Server") Shadows cTempDir As String = Framework.FileFunction.GetIni(Me.cStartupDirectory + "\Main.ini", "System", "Temp") Shadows cData As String = Framework.FileFunction.GetIni(Me.cStartupDirectory + "\Main.ini", "System", "Data") Shadows cErrorDir As String = Framework.FileFunction.GetIni(Me.cStartupDirectory + "\Main.ini", "System", "ErrorDir") Shadows cLogin As String = "Login" <WebMethod()> _ Public Function GetWebServiceVersion() As String CheckLogin() Dim loDirectory As New DirectoryInfo(Me.cStartupDirectory + "\Bin\") ... End FunctionSo, it is a derived class from the one defined at the top. In here, I have to overwrite the default value of cLogin. So, cLogin is using the Login.dbf table.
Throw New System.Exception(cLogin)It would show "Login".
Throw New System.Exception(cLogin)in CheckLogin() to see the value of the field which is frozen to the default value from that method.