stsy.asp文件如下<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<STYLE TYPE="text/css">
<!--
body { font-family: Arial, Helvetica, sans-serif, Verdana; margin-left:0; margin-right:0; margin-top:0; margin-bottom:0; }
input { margin-top:0; margin-bottom:0; padding-top:0; padding-bottom:0; }
select { margin-top:0; margin-bottom:0; padding-top:0; padding-bottom:0; }
a { color:#0033CC; text-decoration:none }
a:hover, a:active { color:#0033CC; text-decoration:underline }
-->
</STYLE>
<title>abcd</title>
</head>
<body bgcolor="#FFFFFF" link="#0033CC" alink="#0033CC" vlink="#0033CC">
<form name = prtsvrbasicInfo method="POST" action=/goform/form_prtsvrbasicInfoSet>
<b>EWS Settings</b>
<table bgcolor="#FFFFFF" border=1 cellspacing=0 cellpadding=0 width=100%><tr><td>
<table bgcolor="#FFFFFF" border=0 cellspacing=0 cellpadding=4 width=100%>
<tr>
<td width=50% nowrap><b><font size=-1>Auto Refresh</font></b></td>
<%WebGetServerEWSSetting(0, 1);%>
</tr>
<tr>
<td width=50% nowrap><b><font size=-1>Auto Refresh Interval</font></b></td>
<%WebGetServerEWSSetting(1, 1);%>
</tr>
</table>
</td></tr></table>
<br>
<table border="0" cellpadding="8" cellspacing="0" align="center"><tr>
<td><input type="submit" value="Apply New Settings" ></td>
<td><input type="reset" value="Restore Settings"></td>
</tr>
</table>
</form>
</td></tr></table>
</body>
</html>请问利用怎样利用WWW-Authenticate,在点击Apply New Settings后弹出登陆认证框(点击Apply New Settings时条用的后台函数是form_prtsvrbasicInfoSet)
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<STYLE TYPE="text/css">
<!--
body { font-family: Arial, Helvetica, sans-serif, Verdana; margin-left:0; margin-right:0; margin-top:0; margin-bottom:0; }
input { margin-top:0; margin-bottom:0; padding-top:0; padding-bottom:0; }
select { margin-top:0; margin-bottom:0; padding-top:0; padding-bottom:0; }
a { color:#0033CC; text-decoration:none }
a:hover, a:active { color:#0033CC; text-decoration:underline }
-->
</STYLE>
<title>abcd</title>
</head>
<body bgcolor="#FFFFFF" link="#0033CC" alink="#0033CC" vlink="#0033CC">
<form name = prtsvrbasicInfo method="POST" action=/goform/form_prtsvrbasicInfoSet>
<b>EWS Settings</b>
<table bgcolor="#FFFFFF" border=1 cellspacing=0 cellpadding=0 width=100%><tr><td>
<table bgcolor="#FFFFFF" border=0 cellspacing=0 cellpadding=4 width=100%>
<tr>
<td width=50% nowrap><b><font size=-1>Auto Refresh</font></b></td>
<%WebGetServerEWSSetting(0, 1);%>
</tr>
<tr>
<td width=50% nowrap><b><font size=-1>Auto Refresh Interval</font></b></td>
<%WebGetServerEWSSetting(1, 1);%>
</tr>
</table>
</td></tr></table>
<br>
<table border="0" cellpadding="8" cellspacing="0" align="center"><tr>
<td><input type="submit" value="Apply New Settings" ></td>
<td><input type="reset" value="Restore Settings"></td>
</tr>
</table>
</form>
</td></tr></table>
</body>
</html>请问利用怎样利用WWW-Authenticate,在点击Apply New Settings后弹出登陆认证框(点击Apply New Settings时条用的后台函数是form_prtsvrbasicInfoSet)
Response.Buffer = True
Response.Clear
Dim Myname, MyPass
GetUser Myname, MyPass
'Response.Write MyName & "->" & MyPass
if len(Myname) = 0 Then
Response.Status = "401 Unauthorized"
Response.AddHeader "WWW-Authenticate","BASIC Realm=enter your realm here"
Response.End
End if Call form_prtsvrbasicInfoSet()
Sub GetUser(ByRef LOGON_USER, ByRef LOGON_PASSWORD)
LOGON_USER = Request.ServerVariables("AUTH_USER")
LOGON_PASSWORD = Request.ServerVariables("AUTH_PASSWORD")
End Sub
%>
还有,需要对点击Apply new setting 时做响应处理嘛?上面的是不是就已经可以实现了?
谢谢!
必须装IIS