473,385 Members | 1,311 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,385 software developers and data experts.

Create Window width new Session: solution


I run into this problem, and I read many places that these is not
solvable.

I have one solution (workaround), not simple, a little trickier,
limited, but possible and usable.
My main problem was, that I have a complex site, and I have to make an
archive site.
Part of database is moved to the archive database (same structure),
and the web should be the same (different users and rights stored in
2nd db) ... and I have to open it from the main site so, that both
sides work simultaneously with different sessions ...

Solution:
In the IIS you have to make Virtual Directories as application
(example: test and test1, and because I am lazy, they local path is
the same directory, they use the same files)
Normally you call the site by the server/test address (so here
http://server/test/test.asp)
In the test asp if you click to open a new window
( javascript:window.open(...) ), you use the other IIS Virtual
Directory, so there you open it as http://server/test1/test.asp
And so in the new window you have the same test.asp running, but width
a different session and sessionID

Test.asp is simple (called as http://server/test/test.asp ):
<html>
<head>
<title>NewID test</title>
</head>
<body>
<table><tr>
<td>SessionID: <%=Session.SessionID%></td>
</tr></table>
<input type="button" onClick="newwindow()" value="new window">

<script language="javascript">
function newwindow() {
window.open('/test1/test.asp','','toolbar=no');
</script>

</body>
</html>
It is limited, because for every new session a new Virtual Directory
is needed (like a working thread, but I only need +1 )

if someone has an easier solution, don't hesitate to share ;)

Zed
Jun 27 '08 #1
1 3364
"MrZed" <mr******@gmail.comwrote in message
news:7d**********************************@i76g2000 hsf.googlegroups.com...
>
I run into this problem, and I read many places that these is not
solvable.

I have one solution (workaround), not simple, a little trickier,
limited, but possible and usable.
My main problem was, that I have a complex site, and I have to make an
archive site.
Part of database is moved to the archive database (same structure),
and the web should be the same (different users and rights stored in
2nd db) ... and I have to open it from the main site so, that both
sides work simultaneously with different sessions ...

Solution:
In the IIS you have to make Virtual Directories as application
(example: test and test1, and because I am lazy, they local path is
the same directory, they use the same files)
Normally you call the site by the server/test address (so here
http://server/test/test.asp)
In the test asp if you click to open a new window
( javascript:window.open(...) ), you use the other IIS Virtual
Directory, so there you open it as http://server/test1/test.asp
And so in the new window you have the same test.asp running, but width
a different session and sessionID

Test.asp is simple (called as http://server/test/test.asp ):
<html>
<head>
<title>NewID test</title>
</head>
<body>
<table><tr>
<td>SessionID: <%=Session.SessionID%></td>
</tr></table>
<input type="button" onClick="newwindow()" value="new window">

<script language="javascript">
function newwindow() {
window.open('/test1/test.asp','','toolbar=no');
</script>

</body>
</html>
It is limited, because for every new session a new Virtual Directory
is needed (like a working thread, but I only need +1 )

if someone has an easier solution, don't hesitate to share ;)
Thats sounds like a reasonable solution to your specific problem. I don't
seeit as being particularly complex or tricky for your scenario.

However its not a solution for the general often requested feature to create
a new session in an application from within a webpage. As you've stated
there is no solution to that general requirement.
--
Anthony Jones - MVP ASP/ASP.NET
Jun 27 '08 #2

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

Similar topics

1
by: Vetrivel | last post by:
Application architecture : Develop interface between two existing systems, a. Enterprise CRM system b. Web based intranet system. Environment : Intranet Server : IIS and ASP. Script :...
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...
6
by: David Hayes | last post by:
juglesh <juglesh@nospamRadioKDUG.com> wrote in "Re: how to maximize the browser window that fits the monitor size?" (Saturday, January 01, 2005 3:12 AM): > > >I want to maximize the browser...
2
by: Andreas Klemt | last post by:
Hello, which is the best way to transfer my DataTable to a PopUp Window? Using Context would be great but I it seems not to work. Which is the best solution? Thanks in advance, Andreas
1
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
2
by: DC Gringo | last post by:
Using vb.net, I have a button control: <asp:Button OnClick="communitiesPrintReport()" id="btnPrintCommunities" runat="server" Text="Button"></asp:Button> Private Sub...
13
by: Daniel Walzenbach | last post by:
Hi, Imagine the following situation: I have an asp.net application which allows uploading files to a SQL Server 2000 database (Files are stored as type "images"). As a next step I would like to...
1
by: rushikesh.joshi | last post by:
Hi All, I want some charting functionality in my ASP.NET application. I want to show a multiple bar on my web page. It's based on down time of different servers. like server1: down betn 4 AM...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.