admin管理员组文章数量:1404922
After trying fingerprinting that requires that the visitor use a web browser with JavaScript enabled, I thought that I would try using browscap... browscap.ini and browscap.dll are available on all Windows computer/servers at either C:\Windows\SysWOW64\inetsrv or C:\Windows\System32\inetsrv
But I have yet to see a working example. Perhaps browscap is no longer supported or that modern web browsers are preventing it from getting a result.
As simple test to see if it was indeed being initialised, I tried using the following code on a test page:
<%@ Language=VBScript %>
<% Option Explicit %>
<%
Dim browserdetect
Set browserdetect = Server.CreateObject("MSWC.BrowserType")
if isObject(browserdetect) then
response.write("The object was created!<br>")
else
response.write("The object was not created")
end if
Response.Write("Platform = " & browserdetect.Platform & "<br>")
Response.Write("Browser = " & browserdetect.Browser & "<br>")
%>
While this code does report that the dll was initialised, there is no result. Of course browsercap.ini should provide much more info and there is a "full" version available for even more info, but what is missing that will enable this simple test to produce a result?
After trying fingerprinting that requires that the visitor use a web browser with JavaScript enabled, I thought that I would try using browscap... browscap.ini and browscap.dll are available on all Windows computer/servers at either C:\Windows\SysWOW64\inetsrv or C:\Windows\System32\inetsrv
But I have yet to see a working example. Perhaps browscap is no longer supported or that modern web browsers are preventing it from getting a result.
As simple test to see if it was indeed being initialised, I tried using the following code on a test page:
<%@ Language=VBScript %>
<% Option Explicit %>
<%
Dim browserdetect
Set browserdetect = Server.CreateObject("MSWC.BrowserType")
if isObject(browserdetect) then
response.write("The object was created!<br>")
else
response.write("The object was not created")
end if
Response.Write("Platform = " & browserdetect.Platform & "<br>")
Response.Write("Browser = " & browserdetect.Browser & "<br>")
%>
While this code does report that the dll was initialised, there is no result. Of course browsercap.ini should provide much more info and there is a "full" version available for even more info, but what is missing that will enable this simple test to produce a result?
Share Improve this question asked Mar 9 at 4:12 WilliamKWilliamK 7982 gold badges14 silver badges32 bronze badges 9 | Show 4 more comments1 Answer
Reset to default 1If you are receiving unknown or default as the output, It means your codes are working well but you are using an old limited version of broswecap.ini . By replacing a full version of browsecap.ini
in C:\Windows\System32\inetsrv and C:\Windows\SysWOW64\inetsrv , you can access more detailed information. To view all available properties use this code:
<%
On Error Resume Next
Set browserdetect = Server.CreateObject("MSWC.BrowserType")
Dim props, prop, val
props = Array("Browser", "Version", "MajorVer", "MinorVer", "Platform", _
"Frames", "Tables", "Cookies", "JavaScript", "VBScript", _
"JavaApplets", "ActiveXControls", "CDF", "isMobile", "Device_Type", "Crawler")
For Each prop In props
val = Eval("browserdetect." & prop)
If Err.Number <> 0 Then
Response.Write prop & " = [Not available]<br>"
Err.Clear
Else
Response.Write prop & " = " & val & "<br>"
End If
Next
Set browserdetect = Nothing
%>
Footnote after receiving comment about CDF: In different versions, some properties may not be supported which is skipped in my code. CDF is reported as "False" (not [Not available]) in the default version of broscap.ini windows 10.
本文标签: How to use browscapdll on Windows Server running IIS and Classic ASPStack Overflow
版权声明:本文标题:How to use browscap.dll on Windows Server running IIS and Classic ASP? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744878257a2630048.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
browscap.ini
exists inC:\Windows\System32\inetsrv or C:\Windows\SysWOW64\inetsrv . Do you receive empty result or unknown? – Ali Sheikhpour Commented Mar 9 at 4:36