Do different tabs in browser result in different sessions for server? - firefox

If I open a connection to the server from firefox browser, and then I open a new tab within the same instance of browser to make a connection to the server, is it considered one session to server or considered as two diff sessions?

It's the same session (you can easily test this out yourself).

It seems to be the same session.
However, if I use diff user to login, both seems to be categorized under same session? Is this the correct behaviour?

If you click a link on the current session to open it up in a new tab, then it'sthe same session. If you just open up a blank window and log in again, then, to the best of my knowledge,it's a new session.

Related

Reusing Electron session

Say I have a BrowserWindow set up with the following options:
{
webPreferences:{
partition: 'persist:example'
}
}
I am also making a call to app.setPath to set userData to a local directory.
If I open my Electron application and log in, close the application, then open a new instance, I am still logged in. This is expected session behavior.
However, if I open my Electron application and log in, then open a second instance of my application with the same BrowserWindow settings and same application paths, the second instance will not be logged in, despite being propped up to use the same user data and partition.
Shouldn't the second instance be able to use session information from the first instance without closing the first instance? What am I doing wrong?

How can i count currently connected users in my lotus application (nsf)?

I have an xpage application and i simply want to count open sessions (anonymous users) or logged in users or both, and display this info on a page.
This question http://bit.ly/1sUMt8m is still open without solution.
Any ideas how to do that?
You can obtain this information from the console. show users will give you all users and their open databases. show opendatabases shows the databases and reads. See the documentation for details.
So you could use sessionAsSigner and issue the console command from your code. Add -xml to get the response in a format you can parse with certainty.
The measure is slightly crude since a user could have closed a window while the session is still valid.
Short of that you would need some JS trickery

Batch script/PowerShell advanced conditionals implementation

My question is in regards to how I should go about implementing a batch script/PowerShell cmdlet on Windows that does the following:
When a browser window is open that has the window/page title "Blank" then send the "tab" key, send login credentials to text boxes on webpage and then send the "enter" key.
I found this article (Automatic login to a website on windows 7/Chrome via batch file) about sending login credentials in a web browser, which is very similar to what I want to do, however I want the script to ONLY run if the browser is already open and has a specific value in the window title. This is for an authentication system for the network running on my server that asks me to re-login every 30 days, and will open up a browser window automatically when it needs me to login. So, when it opens the window, I want the script to be able to automatically login for me. Since the server is unattended (GUI wise), I want the re-authentication to occur automatically. My plan would be to have this set as a scheduled task and have it run nightly, to verify that the system is still authenticated. If the system is not authenticated, I want the batch file/cmdlet to login for me.
I did some research and found information about using conditions for batch files, but I couldn't find any information about how I would use the window title or any other program attribute to base my conditional off of.
People have suggested using PowerShell, so I am totally open to that as well if you have a recommendation for implementation via that route.
Please let me know if you need any further information, or have any questions.
You can do it with Powershell.
Here is an example for getting the window name, it should be possible to use it to detect Internet explorer to.
$selectedWindows = get-process | Where-Object { $_.MainWindowTitle -match "Editor"}
in $selectedWindows there are all windows which title matches "Editor"
Now you can get the $selectedWindows in front and use sendKeys to work with the Window.
For getting the Window activated and in front i have a short example here:
http://pastecode.org/index.php/view/22992037

When copy the url from one browser to another browser my session data are not coming in asp.net MVC3

When i copy the URL from one browser to paste it in another browser my session data not retrieved it shows "Object reference not set to an instance of an object".
(Please note - this answer assumes you are not already using cookieless sessions)
The way sessions work in ASP.NET is that when you first access a site, a cookie-file is placed in your browsers cookie-store. The cookie contains a session ID, so the next time you access that site from that browser the ID is passed to the web-application and it knows which session-state to load.
However, each browser implements it's own cookie-store, so switching browsers means the site cannot determine your session ID.
One way to get around this is to use cookieless sessions. However, these have a number of issues relating to usability and security, so think long and hard before deciding they are for you.
Another option is to tie together your authorization and session systems. However, this is not generally recommended either.
You will not be able to access session values across multiple browsers.
Also, you should check if the value exists in Session to avoid Server Error.
if(Session["Key"] != null)
{
//Write your code here
}
else
{
//Alternative code (redirection code)
}

Liferay: Inter-browser session

The story is like this: using Liferay, if a user is logged-in on one browser and attempts to log-in on another browser (or another machine), then he should have the option of continuing that sesion (i.e. copy all the session attributes from that session and kill it from the first browser) or starting a new one (killing the session on the first machine).
I'd like to know if Liferay has support for something like this. I'm thinking that persisting the session attributes to the DB and getting them back in the second browser (e.g. using a PreLoginAction) might be a solution. I'm curious if there is a provided method of persisting the session and also a way to invalidate / kill the session on the first browser when the second one copies it.
Thanks in advance.
Please add the following properties in your portal-ext.properties and restart the server
#
# Set the following to true if users are allowed to have simultaneous logins
# from different sessions. This property is not used unless the property
# "live.users.enabled" is set to true.
#
auth.simultaneous.logins=true
##
## Live Users
##
#
# Set this to true to enable tracking via Live Users.
#
live.users.enabled=true

Resources