home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 April
/
CMCD0404.ISO
/
Software
/
Freeware
/
Programare
/
Sharpdev
/
099bsetup.exe
/
VBNETSessionStateWebService.xft
< prev
next >
Wrap
Extensible Markup Language
|
2003-09-21
|
1KB
|
46 lines
<?xml version="1.0"?>
<Template Originator="Christoph Wille" Language="VBNET" Created="6/13/2001" LastModified="6/13/2001">
<TemplateConfiguration>
<Name>${res:Templates.File.VB.SecureVBNetWebService.Name}</Name>
<Icon>VB.File.WebFile</Icon>
<Category>VB</Category>
<LanguageName>VBNET</LanguageName>
<Description>${res:Templates.File.VB.SecureVBNetWebService.Description}</Description>
</TemplateConfiguration>
<TemplateFiles>
<File DefaultExtension=".asmx" DefaultName="Empty">
<![CDATA[<%@ WebService Language="VB" Class="YourClassname" %>
' created on ${DATE} at ${TIME}
Imports System
Imports System.Web.Services
Public Class YourClassname : Inherits WebService
<WebMethod(EnableSession:=true)> Public Function Login(Username As String, Password As String) As Boolean
' replace with database code to your liking
If ("user" = Username And "pwd" = Password) Then
Session("LoggedIn") = True
Login = True
Else
Session("LoggedIn") = False
End If
End Function
<WebMethod(EnableSession:=true)> Public Function IsUserLoggedIn() As Boolean
If Session("LoggedIn") Is Nothing Then
IsUserLoggedIn = False
Else
IsUserLoggedIn = CBool(Session("LoggedIn"))
End If
End Function
End Class
]]>
</File>
</TemplateFiles>
<FileOptions/>
</Template>