简体   繁体   English

如何从客户端计算机检测当前的共享点页面?

[英]How to detect the current sharepoint pages from the client machine?

On the client machine I need to be able to somehow detect which sites the current user are looking at right now. 在客户端计算机上,我需要能够以某种方式检测当前用户当前正在查看哪些站点。 I know the base URL of the sharepoint app, say sharepoint.thecompany.net but how the hack do I get the last requested url from the server? 我知道sharepoint应用程序的基本URL,例如sharepoint.thecompany.net,但是我该如何从服务器获取最后请求的URL? I have hit a dead stop when trying to iterate the current processes and the casting the iexplorer process to something I can work with, I just don't know which kind of object to cast the process to :-( 尝试迭代当前进程并将iexplorer进程强制转换为可以使用的对象时,我遇到了死路,我只是不知道将哪种类型的对象强制转换为:-(

I hope to implement this logic in a C# assembly what should run on the client box. 我希望在C#程序集中实现此逻辑,该逻辑应在客户端盒上运行。

Any other approach that might work? 还有其他可行的方法吗?

Thanks in advance 提前致谢

WatiN will allow you to attach to IE instances and get the current url from them. WatiN将允许您附加到IE实例并从中获取当前URL。 It will also allow you to do the same with Firefox instances. 它还将允许您对Firefox实例执行相同的操作。

It might be more efficient however to try to get requested urls at the network level using a wireshark type concept where you are just listening to http traffic on the computer and keeping track of the urls but a solution like that is a bit over my head. 但是,尝试使用Wireshark类型的概念在网络级别获取请求的URL效率更高,您只是在听计算机上的HTTP流量并跟踪这些URL,但这样的解决方案有点麻烦。

EDIT: I came across this while looking for a solution: http://www.codeproject.com/KB/IP/networkmonitor.aspx From what I can see I would think you could adapt the monitoring code to monitor and look for http request packets and parse the headers for the url information you need. 编辑:我在寻找解决方案时遇到了这个问题: http : //www.codeproject.com/KB/IP/networkmonitor.aspx从我看到的内容中,我认为您可以调整监视代码来监视和查找http请求数据包并解析标头以获得所需的url信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM