I have the following code:
public class A
{
private ISessionFactory _sf;
A(ISessionFactory sf)
{
_sf = sf;
}
public void SomeFunc()
{
using (var session = _sf.OpenSession())
using (var transaction = session.BeginTransaction())
{
// query for a object
// cha...
I have some code that will log the user out after x seconds of inactivity. The problem is that it logs them out before the time specified it doesn't even count the inactivity.
This is the code:
<?php
$_SESSION['loginTime'] = time();
if($_SESSION['loginTime'] < time()+10*60){
$error_msg ="Logged out due to inactiv...
Hi,
I want to present you my windows forms application scenario:
I want to create an invoice, so I open new window with invoice details. Then I want to add new customer (to the database), that I want to use in my invoice. After entering all the information (including new customer info) I click Save to save my new document.
The questio...
How can I invalidate a session using EL?
...
hello ,
here is my code:
if session[:firsttimestart].nil?
else
@firsttime = false
end
if @firsttime == true
initglobals()
end
session[:firsttimestart]=false
the problem is when i turn off the server and come back to the application the session[:firsttimestart] is still false , it somehow stores this variable in my system withou...
I am developing a java web-site. It fetches data from http://projects.zoho.com.
I have to fetch data using its API and want to fill database in a session.
But, I need this process occur at deploy time. Means, at first time when I deploy web, it would fill whole database and then at every session period of time it fills data automatica...
I have the following relationship:
// In A.java class
@OneToMany(mappedBy="a", fetch=FetchType.LAZY)
@Cascade(CascadeType.SAVE_UPDATE)
private List<B> bList;
// In B.java class
@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name="id_a")
@Cascade(CascadeType.SAVE_UPDATE)
private A a;
I get this exception:
StaleStateException: Batch upd...
Hey,
I have this problem when trying to read a session in another asp.net page.
Object reference not set to an instance of an object.
If Session("cne").Equals("") Then
Response.Redirect("Default.aspx")
End If
I'm setting the session in the Default page with this code :
Session("cne") = cne.Text
Thanks.
...
Please look at the example below:
Now while scenarios #1 and #3 are quire obviouse, my question is:
Is it possible that scenario #2 is valid ? i.e Connected - But no permissions given.
Thanks.
--
Code:
FB.login(function(response) {
if (response.session) {
if (response.perms) {
// #1 user is logged in and grante...
Hi I am having scenario that I am using 4 tomcat instances on our server.When user login then suppose it is connected to tomcat-1 so we stored all session values in tomcat-1.Then we are processing paypal.After paypal processing user is get diverted to another tomcat say tomcat-2.So there are no values in session for this user.And I am fa...
The correct answer to question [1] below is:
Configure SrvA with no default gateway address
What I cannot understand -
1)
Why would it prevent the hosts on subnet B to connect to hosts on subnet A and through them to SrvA (since they, according to the task solved and correct answer, would continue to have access to SrvA)?
1a) ...
Session is not maintained when page gets redirected to another in my localhost,
I have a admin login page of my osCommerce v2.0 site, whenever i login its the session registered in login page is not found in index page hence redirected back to login page...
Please guide me why this happening in my localhost and not in my server?
...
I have several variables that I need to send from page to page...
What is the best way to do this?
Just send them one by one:
string var1 = Session["var1"] == null ? "" : Session["var1"].ToString();
int var2 = Session["var2"] == null ? 0 : int.Parse(Session["var2"].ToString());
and so on...
Or put them all in some kind of container-...
If a user logs in and selects "Remember me for 2 weeks", I want the session to remember them for 2 weeks. If not, it should expire in 2 hours. How do I do this?
...
We're using an Out-of-Process Session Provider (ScaleOut) for an ASP.NET application and we've noticed that when an object that's not correctly setup for de-serialization inadvertently makes its way into session it will eventually cause the entire process to terminate.
Reproducing and handling this scenario is where it gets even more i...
I want to get a session loaded by the Session class given a particular session id. Is this possible?
...
Trying to use database sessions in PHP without re-inventing the wheel so I'm looking for a clean library or example that could send me in the right direction.
...
Does size matter when choosing the right algorithm to use for a session hash.
I recently read this article and it suggested using whirlpool to create a hash for session id. Whirlpool generates a 128 character hash string, is this too large?
The plan is to store the session hash in a db. Is there much of a difference between maybe using...
I am using wamp 2 for accessing one of my project on localhost, initially i had a problem of maintaining the session in my localhost which i resolved by enabling session.auto_start and providing the domain name with period (.) in it as "127.0.0.1",
But now the problem is whenever I switch to another page I do not get anything on the pag...
As informed by the example in the Bloomberg APIv3, i need to start a Bloomberg session to open a service, then i need to use the service to create a request.
My question is, if my program sent a request, got the answer, and then after a while it might need to send another request. In this situation, how do i determine whether the Sessi...