secure.asmx
来自「This is a book about vb.you could learn 」· ASMX 代码 · 共 24 行
ASMX
24 行
<%@ WebService Class="SecureSample" %>
Imports System.Web.Services
Imports System.Web.Security
Public Class SecureSample
Inherits WebService
<WebMethod> _
Public Function WhoAreYou() As String
Return User.Identity.Name
End Function
<WebMethod> _
Public Function Authenticate(username As String, password As String)
If (username = "John") AND (password = "password") Then
FormsAuthentication.SetAuthCookie(username, true)
Return true
End If
Return false
End Function
End Class
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?