session

Hosting multiple WebBrowser controls in one window causes sessions to "cross": any solutions?

I have a Windows forms application written in VB.NET where I host multiple WebBrowser controls in the same window. The problem I'm having is that the session for each WebBrowser control seem to get "crossed" when making asynchronous requests, such as when loading images. For instance, I have WebBrowser1 that loads an HTML document and ...

Is it safe to access asp.net session variables through static properties of a static object?

Is it safe to access asp.net session variables through static properties of a static object? Here is what I mean: public static class SessionHelper { public static int Age { get { return (int)HttpContext.Current.Session["Age"]; } set { HttpContext.Current.Session[...

NHibernate Session per Call in WCF - How to Rollback

I've implemented some components to use WCF with both an IoC Container (StructureMap) and the Session per Call pattern. The NHibernate stuff is most taken from here: http://realfiction.net/Content/Entry/133. It seems to be OK, but I want to open a transaction with each call and commit at the end, rather than just Flush() which how it...

Access Rails 3 Session from Rack?

I was able to do the following in Rails 2.3.5 to access attributes that I set on the session from within my Rails app. Now in Rails 3, env["rack.session"] is nil. How do I do the same thing in Rails 3? class CallbackFilter def initialize(app) @app = app end def call(env) unless env["rack.session"][:oauth_callback_method...

Java: Tracking a user login session - Session EJBs vs HTTPSession

If I want to keep track of a conversational state with each client using my web application, which is the better alternative - a Session Bean or a HTTP Session - to use? Using HTTP Session: //request is a variable of the class javax.servlet.http.HttpServletRequest //UserState is a POJO HttpSession session = request.getSession(true); Us...

How to alert or warn a user that session will be expiring soon in php codeigniter

Basically I'm looking for a solution where a user is notified five minutes before the session expires. The ideal solution will be count down notification that will have an option to renew the session. If the countdown timer expires without the user refreshing the page, I need to log them out. ...

Data Access Layer - Using sessions to CRUD data.

Hi, I have a DAL to CRUD product data. For example: Order someOrder = new Order(); someOrder.Description = "Test"; someOrder.Save(); someOrder.Remove(); I need to design the DAL so that only users who have a lock on an Order type object can carry out CRUD operations. My idea is to pass the session to the CRUD methods. Once I pass ...

Double Slash at end of URL when going to HTTPS?

My site currently uses http and https sections based on the data being collected on the site (form data uses https). On my index page, I have the PHP code at the top: <?php session_start(); ob_start(); if( $_SERVER['SERVER_PORT'] == 443) { header('Location:http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])...

How to communicate/share a session between pages over HTTP and HTTPS

What is common practice for coding web applications where part of the site has to be secured (e.g. checkout section) and part not necessarily, let's say homepage? As far as I know sharing sessions in between HTTP and HTTPS parts of the site is not easily possible (or is it?). What would be common approach if I wanted to display on HTTP p...

help with multi dimentional arrays

hi, i am building a shopping cart and cant figure out how to store something like this into a session. [product_id1] = quantity; [product_id1] = size [product_id1] = color; [product_id2] = quantity; [product_id2] = size; [product_id2] = color; ... etc so when a user select the quantity of a product then selects its color then select...

web application with secured sections, sessions and related trouble

I would like to create web application with admin/checkout sections being secured. Assuming I have SSL set up for subdomain.mydomain.com I would like to make sure that all that top-secret stuff ;) like checkout pages and admin section is transferred securely. Would it be ok to structure my application as below? subdomain.mydomain.com ...

In https:// page the PHP Session not working only in IE7 and IE8

can any one please reply why the php session is not properly working on IE7 and IE8 when the web page is navigated to https secured pags? i have properly used the statement at the begining of my php page ob_start(); session_start(); ...

how to check if session exists or not

I am creating the session using HttpSession session=request.getSession(); before creating session i want to check if session is existing or not,how would i do this? ...

Upgrading to IIS7 stopped Firefox from receiving cookies?

Our website has been using IIS6 for a long time. We test on IE8, Firefox, and Chrome. All browsers worked fine. We recently did an upgrade to IIS7, and Chrome and IE8 continue to work normally, but Firefox appears to be unable to get the ASP session cookie. As a result, when our code checks the Session[] object, we see nothing, we th...

session_set_cookie_params on multi-domain sites

Hi! I'm currently developing for an application (www.domain.se, .eu) where we're experiencing problems with sessions not propagating across domains. Internet Explorer is the root cause of this, as it will differentiate sessions depending on whether we're typing in "domain.se" or "www.domain.se". Due to some unfortunate redirecting, we're...

Want to understand authorization,cookies,users logins,sessions...

Hello, I want to understand the logic of authorization,cookies,users logins,sessions..Do you know any source that explain and teach me about it. If it could give any examples it would be great. I mostly use php,jsp but it would be no problem if you give answer related other languages. ...

How to handle this "session failed to write file" error in PHP?

I am using the Kohana 3 framework, and am using the native session driver. For some reason, occasionally the sessions fail to write to their file. Warning: session_start() [function.session-start]: open(/tmp/sess_*****, O_RDWR) failed: Permission denied (13) in /home/site/public_html/system/classes/kohana/session/native.php on line 27...

Calling Facebook API without authenticating user/"connecting"

Hi, I am working with facebook's API and I want to call the links.prevew method. http://wiki.developers.facebook.com/index.php/Links.preview Is it possible to call this method without having my user authenticate or "connect"? For example, not all of my users have hooked up their facebook accounts to my website, but I still want to use...

AnnotationSessionFactoryBean and singleton scoped bean (Spring framework)

I define a bean of type AnnotationSessionFactoryBean for using in a web-app. If I do not explicitly define it as NOT singleton, it must be singleton. Now, it is bound to the current thread. It means it cannot be a singleton. p.s. Session produced by Factory is not a singleton, SessionFactory on the other hand is always a singleton. N...

Django sessions don't work with Apache installed on Ubuntu

In production server I can't login to my website. I know that it is some bug of Django with MD5 crypt or something like that, but unfortunately I don't remember what I should do. I am searching the answer since half day, but I can't find this website where was explained this problem. DO you know how I can do sessions working. ...