日期:2014-05-20  浏览次数:20823 次

axWebBrowser和session的问题
很无语,在winform里使用axWebBrowser,现象如下:

在formA里用axWebBrowse加载了一个页面A,点这个页的某个button,会存一些东西到session里,然后弹出页面B,在B中使用了前面存的session。现在问题是B里读session为空。而直接用ie访问页面A点button浏览B是没问题的。

不知道谁碰到过这种情况,如何解决?

------解决方案--------------------
帮LZ顶

http://user.qzone.qq.com/31767702
------解决方案--------------------
jf
------解决方案--------------------
说来听听,到底是什么回事?
------解决方案--------------------
.NET 2.0直接用WebBrowser控件吧,比用直接用axWebBrowser好,除了Script错误控制有bug。
------解决方案--------------------
axWebBrowser 没用过 帮顶好了
------解决方案--------------------
I don 't think a new window in the same process can lose session information...
------解决方案--------------------
> > I don 't think a new window in the same process can lose session information...

Agree. You need to intercept NewWindow event and provide the IDispatcher interface of a WebBrowser control of the same process.
------解决方案--------------------
处理WebBrowser的NewWindow2 Event,然后把第一个参数(ppDisp)设置成你自己的In the same process的WebBrowser.
------解决方案--------------------
up
------解决方案--------------------
@_@