' Check if the session is a valid one Public Function CheckLogin(string Login) Dim llSuccess As Boolean llSuccess = Framework.Security.LoginSession(Login, 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 Functionand your sub-class, you'd have to call it like this:
me.CheckLogin(cLogin)
How would that work for you?>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 Class >>
>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 Function >>
> Throw New System.Exception(cLogin) >>
> Throw New System.Exception(cLogin) >>