Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C# ASP.NET
Hi All,
How can I detect multiple windows or tabs for some web application?
If i open same web application in one tab, i want to restrict site from opening in another tab.Any one give code plz.
Thanks & Regards
Posted 11-Dec-12 2:31am
Edited 11-Dec-12 3:23am
Comments at 11-Dec-12 7:33am
may be u can detect it by checking IP Address of each session.
Hari Krishna Prasad Inakoti at 11-Dec-12 7:35am
can u explain? at 11-Dec-12 7:40am
In your global.asax file, overload session_start method create a global app level list of sessions and ip addresses.
And before adding to this list, Loop through all sessions and check the IP address or current session is same as any previous session or not?
If already exists with same IP then deny otherwise add current to list and let user access the site.
Hari Krishna Prasad Inakoti at 11-Dec-12 7:53am
can u give the code?.I'm new one of .net
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Hi All,
I got Solution

Public Sub TheSessionId()
        Dim ss As HttpSessionState = HttpContext.Current.Session
        If Not HttpContext.Current.Session("id") Is Nothing Then
            HttpContext.Current.Session("id") = ss.SessionID
        End If
    End Sub

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 484
1 Peter Leow 443
2 Sergey Alexandrovich Kryukov 288
3 Kornfeld Eliyahu Peter 270
4 Maciej Los 230

Advertise | Privacy | Mobile
Web02 | 2.8.150301.1 | Last Updated 12 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100