⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 _soapheaderauthentication.aspx

📁 This is a book about vb.you could learn this from this book
💻 ASPX
字号:
<%@ Import Namespace="Security"%>
<%@ Import Namespace="System.Web.Services.Protocols" %>

<script runat=server>
  Public Sub Page_Load()
    span1.InnerHtml = ""
    span2.InnerHtml = ""
  End Sub

  Public Sub Authenticate_Click(sender As Object, e As EventArgs)
    Dim s As New SecureWebService()

    ' Create the Authentication header and set values
    Dim a As New Authentication()
    a.User = user.Value
    a.Password = password.Value

    ' Assign the Header
    s.AuthenticationValue = a

    ' Call method
    Try
      span1.InnerHtml = s.ValidUser()
    Catch soap As SoapException
      span2.InnerHtml = soap.Message
    End Try
  End Sub
</script>

<form runat=server>
        <font size=6>
	Username: <input type=text id=user runat=server/>
	<BR>
	Password: <input type=text id=password runat=server/>
	<P>
	<input type=submit runat=server OnServerClick="Authenticate_Click" value="Login"/>
        </font>
</form>
<hr size=1>
<font size=6>result: <font color=red><span id=span1 runat=server/></font></font>
<P>
<font size=6>error: <font color=red><span id=span2 runat=server/></font></font>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -