473,383 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

New ASP session issue when new window opened from WebBrowser control embedded in VBForm client

Application architecture : Develop interface between two existing
systems,
a. Enterprise CRM system
b. Web based intranet system.

Environment : Intranet
Server : IIS and ASP.
Script : VBScript and Javascript
Client : 1. IE browser.
2. VBForm embedded with WebBrowser control (MS Internet
control - shdocvw.dll) called from another enterprise application.

Web App : Uses server side business logic implemented in COM
components. For each ASP session(starts with first ASP page user
access and ends with last ASP page), server COM components are
instanciated and held in session variables and liberally used in many
of the ASP pages. In the last page, there is an "Exit" button, which
when the user press, client side javascript closes the frames etc and
invokes a destructor like Close.asp page (in a seperate window)that
releases the session vars holding the COM component. Also, when
window-close button(X) of IE is pressed same client side javascript
invokes Close.asp pagein a seperate window.

So far fine. No issues.

Issue :

When VBForm client is used, in the custom browser, if user press the
"Exit" button to end the session, all the server side COM components
held in Session vars are released immediately. No issues at all.
However, if the user press the close button(X) of the VBForm, a new
window spawned with Close.asp. However, the server side COM components
are not released.

Result : If website accessed through VBForm client, server side COM
components are not released and hangs there for 20 minutes before they
are released. Causes severe stress on the server, thus users getting
slow response, at times requires a server reboot.

Rootcause :

It was discovered during rootcause analysis and further corroborated
by many ofearlier questions in these forums and elsewhere is that,

when a WebBrowser control client is used (as in the case here), the
moment user close the window and new window is opened (by client side
javascript) with Close.asp, IIS thinks it is a new session. So, it
tries to release the COM components of the new session (though none at
this point). Thus, the scope is lost for the orinigal session and its
session vars hang there until session is timedout after 20 minutes.

The crux of the problem is IE and WebBrowser control behaving
differently w.r.t new windows. For IIS, with IE, the new window
belongs to existing session but with Webbrowser control, the new
window belongs to a new session.

Ever elusive Solution : ?????

So, with this detailed problem description , does any one have a
solution to retain the original session even after opening a new
window from VBForm client.

Any solution(direct or alternate), workaround is very much
appreciated.

Thanks a lot for your help.
-Vetri
Jul 19 '05 #1
1 7938
When IE opens a new window (using File -> New Window, or a link that opens a
new window, or javascript that opens a new window), the new window runs in
the same process space as the old window. Thus it has access to the session
cookie that stores the ASPSessionID, and returns it to the server. The
server does it's work.

It seems that you other application doesn't know about the ASPSession
cookie, or if it does, isn't programmed to send that to the server. IIS then
thinks that this is a new session.

(ASP session state is maintained by the server sending the browser a cookie
that holds the SessionID. The browser needs to return that to the server, so
the server can associate the request with one of the sessions being
maintained on the server. If the browser doesn't return the cookie, then IIS
assumes that this is a new user, and starts a new session).

Cheers
Ken
"Vetrivel" <ve*****@hotmail.com> wrote in message
news:c0*************************@posting.google.co m...
: Application architecture : Develop interface between two existing
: systems,
: a. Enterprise CRM system
: b. Web based intranet system.
:
: Environment : Intranet
: Server : IIS and ASP.
: Script : VBScript and Javascript
: Client : 1. IE browser.
: 2. VBForm embedded with WebBrowser control (MS Internet
: control - shdocvw.dll) called from another enterprise application.
:
: Web App : Uses server side business logic implemented in COM
: components. For each ASP session(starts with first ASP page user
: access and ends with last ASP page), server COM components are
: instanciated and held in session variables and liberally used in many
: of the ASP pages. In the last page, there is an "Exit" button, which
: when the user press, client side javascript closes the frames etc and
: invokes a destructor like Close.asp page (in a seperate window)that
: releases the session vars holding the COM component. Also, when
: window-close button(X) of IE is pressed same client side javascript
: invokes Close.asp pagein a seperate window.
:
: So far fine. No issues.
:
: Issue :
:
: When VBForm client is used, in the custom browser, if user press the
: "Exit" button to end the session, all the server side COM components
: held in Session vars are released immediately. No issues at all.
: However, if the user press the close button(X) of the VBForm, a new
: window spawned with Close.asp. However, the server side COM components
: are not released.
:
: Result : If website accessed through VBForm client, server side COM
: components are not released and hangs there for 20 minutes before they
: are released. Causes severe stress on the server, thus users getting
: slow response, at times requires a server reboot.
:
: Rootcause :
:
: It was discovered during rootcause analysis and further corroborated
: by many ofearlier questions in these forums and elsewhere is that,
:
: when a WebBrowser control client is used (as in the case here), the
: moment user close the window and new window is opened (by client side
: javascript) with Close.asp, IIS thinks it is a new session. So, it
: tries to release the COM components of the new session (though none at
: this point). Thus, the scope is lost for the orinigal session and its
: session vars hang there until session is timedout after 20 minutes.
:
: The crux of the problem is IE and WebBrowser control behaving
: differently w.r.t new windows. For IIS, with IE, the new window
: belongs to existing session but with Webbrowser control, the new
: window belongs to a new session.
:
: Ever elusive Solution : ?????
:
: So, with this detailed problem description , does any one have a
: solution to retain the original session even after opening a new
: window from VBForm client.
:
: Any solution(direct or alternate), workaround is very much
: appreciated.
:
: Thanks a lot for your help.
: -Vetri
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Tony G. | last post by:
Hi there, I have an APS 3 application, running on a Windows 2003 Web edition server - it is a very busy website, and when users are click on certain links (membership info), a new window i...
0
by: Mike | last post by:
Hi, We have an ASP.NET based website that can run either standalone or within our Win32 client via an embedded IE browser control. The site when running standalone in IE is fine, all works just...
3
by: Jamie | last post by:
Hello, We are opening Web Forms via a workflow system that our company has purchased from an outside vendor. Our problem is when opening multiple pages from the workflow system for the same Web...
10
by: Li Pang | last post by:
Hi, I created a html page from which I give a link to another web site. The new site is opened in a new window. When I opened multiple windows, they all have the same SessionID. I want ot know...
18
by: BillE | last post by:
When a user opens a new IE browser window using File-New-Window the integrity of an application which relies on session state is COMPLETELY undermined. Anyone who overlooks the fact that...
26
by: BillE | last post by:
Some ASP.NET applications use Session Variables extensively to maintain state. These should be re-written to use viewstate, hidden fields, querystring, etc. instead. This is because if a user...
17
by: Zytan | last post by:
I can scroll a WebBrowser to the bottom like so: if (webControl.Document != null) webControl.Document.Body.ScrollTop = int.MaxValue; But, if I include a proper DOCTYPE (for XHTML 1.1 DTD) like...
6
by: =?Utf-8?B?QW1pciBUb2hpZGk=?= | last post by:
Hi Our application was using Session variables to store business object for our Web Forms successfully until someone opened a cloned IE window using Control-N key press. The cloned window...
1
by: =?Utf-8?B?YWxiZXJ0bHk=?= | last post by:
How can I create a new session from the existing session in asp.net when new IE session is opened using javascript's window.open method or user's hyperlink click? I have a web application which...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.