如题,http设置成只有特定ip可以访问,例如只允许192.168.2.2--192.168.2.20进行访问21-100不可访问?
httprequest事件第一行
dim ss() as string = e.Request.RemoteEndPoint().Address.ToString().split(".")
dim a as integer = cint(ss(ss.length - 1))
if a>=2 andalso a<=20 then
其它正常的网页代码
else
e.WriteString("无权访问")
end if