📄 secure.asmx
字号:
<%@ 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -