Create Window width new Session: solution

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MrZed

    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:wind ow.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.Sess ionID%></td>
    </tr></table>
    <input type="button" onClick="newwin dow()" value="new window">

    <script language="javas cript">
    function newwindow() {
    window.open('/test1/test.asp','','t oolbar=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
  • Anthony Jones

    #2
    Re: Create Window width new Session: solution

    "MrZed" <mrzed001@gmail .comwrote in message
    news:7d55c986-d2ce-4007-a479-230dab3366ec@i7 6g2000hsf.googl egroups.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:wind ow.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.Sess ionID%></td>
    </tr></table>
    <input type="button" onClick="newwin dow()" value="new window">
    >
    <script language="javas cript">
    function newwindow() {
    window.open('/test1/test.asp','','t oolbar=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


    Comment

    Working...