现在有一个Asp.net应用程序,需要客户端添加受信任站点才能访问
但不知怎么去判断,以便提示用户
但不知怎么去判断,以便提示用户
解决方案 »
- 不放心,再问下各位大虾:asp.net后台频繁重写HTML文件,会不会影响用户浏览HTML页面?
- DataTable 读取SQL表
- mht附件下载的问题,十分诡异
- dropdownlist过滤数据问题
- 请问一个fckeditor编辑器的问题?
- 如何把客户端的xml,schema提交发送到服务器端用dataset保存到数据库?
- 上傳路徑問題 馬上結帖
- 真的只有10分了:FormsAuthenticationTicket写入到cookie中的问题
- 急啊!怎么没人理我啊!在线等待!请快帮忙!要出人命了!
- 我想买个能在特定网站发布特定广告的软件!
- 如何能捕捉到关闭IE窗口事件
- DropDownList和TextBox联动的问题
sub checkTrust()
on error resume next
dim shell, str1004 ,str1201, strRange, sRangePath
set shell = createobject("wscript.shell")
str1004 = shell.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1004")
str1201 = shell.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1201") sRangePath=split(location.host,":")(0)
if not isnumeric(replace(sRangePath,".","")) then 'domain name
if ucase(trim(sRangePath))="LOCALHOST" then 'add for http:\\localhost
strRange = shell.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\localhost\http")
elseif ucase(trim(sRangePath))="WEB" then 'add for http:\\web
strRange = shell.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\web\http")
else
iRangePos=instrrev(sRangePath,".",instrrev(sRangePath,".")-1)+1
strRange = shell.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\" & mid(sRangePath,iRangePos) & "\" & left(sRangePath,iRangePos-2) & "\*")
end if
else
strRange = shell.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range" & sRangePath & "\:Range")
end if
set shell = nothing
if str1004 = "0" and str1201 = "0" and strRange <> "" then
msgbox("已經加入信任站點")
else
msgbox("未加入信任站點")
end if
end sub
</script>