Search Results

Search found 15797 results on 632 pages for 'session variables'.

Page 11/632 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Why does every thread in my application use a different hibernate session?

    - by Ittai
    Hi, I have a web-application which uses hibernate and for some reason every thread (httprequest or other threads related to queueing) uses a different session. I've implemented a HibernateSessionFactory class which looks like this: public class HibernateSessionFactory { private static final ThreadLocal<Session> threadLocal = new ThreadLocal<Session>(); private static Configuration configuration = new AnnotationConfiguration(); private static org.hibernate.SessionFactory sessionFactory; static { try { configuration.configure(configFile); sessionFactory = configuration.buildSessionFactory(); } catch (Exception e) {} } private HibernateSessionFactory() {} public static Session getSession() throws HibernateException { Session session = (Session) threadLocal.get(); if (session == null || !session.isOpen()) { if (sessionFactory == null) { rebuildSessionFactory();//This method basically does what the static init block does } session = (sessionFactory != null) ? sessionFactory.openSession(): null; threadLocal.set(session); } return session; } //More non relevant methods here. Now from my testing it seems that the threadLocal member is indeed initialized only once when the class is first loaded by the JVM but for some reason when different threads access the getSession() method they use different sessions. When a thread first accesses this class (Session) threadLocal.get(); will return null but as expected all other access requests will yeild the same session. I'm not sure how this can be happening as the threadLocal variable is final and the method threadLocal.set(session) is only used in the above context (which I'm 99.9% sure has to yeild a non null session as I would have encountered a NullPointerException at a different part of my app). I'm not sure this is relevant but these are the main parts of my hibernate.cfg.xml file: <hibernate-configuration> <session-factory> <property name="connection.url">someURL</property> <property name="connection.driver_class"> com.microsoft.sqlserver.jdbc.SQLServerDriver</property> <property name="dialect">org.hibernate.dialect.SQLServerDialect</property> <property name="hibernate.connection.isolation">1</property> <property name="hibernate.connection.username">User</property> <property name="hibernate.connection.password">Password</property> <property name="hibernate.connection.pool_size">10</property> <property name="show_sql">false</property> <property name="current_session_context_class">thread</property> <property name="hibernate.hbm2ddl.auto">update</property> <property name="hibernate.cache.use_second_level_cache">false</property> <property name="hibernate.cache.provider_class">org.hibernate.cache.NoCacheProvider</property> <!-- Mapping files --> I'd appreciate any help granted and of course if anyone has any questions I'd be happy to clarify. Ittai

    Read the article

  • state server session - cross appDomain?

    - by newone1
    When using a State server for session, are sessions still appDomain specific? So for example, I have two different IIS applications(virtual directories) on a web server, and they both point to one state server for session. The session guid from the cookie will be the same across requests from both applications, so will the same session be accessible across both of these applications? Thanks.

    Read the article

  • symfony2.4 ajax call update or set session issues

    - by user3797283
    i have an issue with symfony2 when i use ajax to set session, hope u pro guys can help me. here is my controller code: //show month event list public function indexAction() { if ($this->getRequest()->isXmlHttpRequest()) { $paging = $this->getRequest()->get("nom"); $session = $this->getRequest()->getSession(); if ($paging) { //if $paging is set, then that's a click pager ajax event //(not 1st time load) $year = $paging; $session->set('year', $year); } else { //$paging is null, it's the first time page load $year = (new \DateTime())->format("Y"); $session->set('year', $year); } $repository = $this ->getDoctrine() ->getManager() ->getRepository('HycAccountBundle:MonthEvent'); $annuallist = $repository->monthListByYear($year); $jsonlist = json_encode($annuallist); return new Response($jsonlist); } //this part is to return entity to twig for using after $em = $this->getDoctrine()->getManager(); $allimages = $em->getRepository('HycAccountBundle:TypeImage') ->findAll(); return $this->render('HycAccountBundle:Account:index.html.twig', array('allimages' => $allimages)); } here is my twig code: <script type="text/javascript"> $(function() { $(document).ready(function (){ jQuery.ajax({ type: 'GET', cache: false, url: "{{ path('hyc_account_homepage') }}", success: function(data, textStatus, jqXHR) { alert({{app.session.get('year')}}); //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! //!!!!!!!!! here i can get year 2014 !!!!!!!!!!!!!! //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! }, error:function (){ alert('error!'); } }); return false; }); }); </script> but when i click pager part, for example, i click year 2013, then ajax call will return a number (data: 'nom=' + num) to controller, but there i reset session value to num normally, but i cant get alert correct session (it's always 2014 as the 1st time) here is the code ajax, almost same as above: <script type="text/javascript"> $(document).ready(function(){ //after paging, reload month $('#page-selection').bootpag({ total: 3000, page: 2014, maxVisible: 5 }).on('page', function(event, num){ jQuery.ajax({ type: 'GET', url: "{{ path('hyc_account_homepage') }}", data: 'nom=' + num, success: function(data, textStatus, jqXHR) { alert({{app.session.get('year')}}); //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! //here is the problem, it's always 2014, not set again !!!!!!!! //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! }, error:function (){ alert('error!'); } }); return false; }); }); </script> hope u guys help me, thanks in advance, i've tried for almost 1 day and looked for almost all in google but find nothing = =

    Read the article

  • Session state server saying extended class no serializable

    - by jenson-button-event
    I am storing an object in session state (using local session state server), class def is: [Serializable] public class ExtendedOAuth2Parameters : OAuth2Parameters but the service is still reporting: Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. [SerializationException: Type 'Google.GData.Client.OAuth2Parameters' in Assembly 'Google.GData.Client, Version=2.1.0.0, Culture=neutral, PublicKeyToken=04a59ca9b0273830' is not marked as serializable.] How to get around it?

    Read the article

  • NUMA-aware placement of communication variables

    - by Dave
    For classic NUMA-aware programming I'm typically most concerned about simple cold, capacity and compulsory misses and whether we can satisfy the miss by locally connected memory or whether we have to pull the line from its home node over the coherent interconnect -- we'd like to minimize channel contention and conserve interconnect bandwidth. That is, for this style of programming we're quite aware of where memory is homed relative to the threads that will be accessing it. Ideally, a page is collocated on the node with the thread that's expected to most frequently access the page, as simple misses on the page can be satisfied without resorting to transferring the line over the interconnect. The default "first touch" NUMA page placement policy tends to work reasonable well in this regard. When a virtual page is first accessed, the operating system will attempt to provision and map that virtual page to a physical page allocated from the node where the accessing thread is running. It's worth noting that the node-level memory interleaving granularity is usually a multiple of the page size, so we can say that a given page P resides on some node N. That is, the memory underlying a page resides on just one node. But when thinking about accesses to heavily-written communication variables we normally consider what caches the lines underlying such variables might be resident in, and in what states. We want to minimize coherence misses and cache probe activity and interconnect traffic in general. I don't usually give much thought to the location of the home NUMA node underlying such highly shared variables. On a SPARC T5440, for instance, which consists of 4 T2+ processors connected by a central coherence hub, the home node and placement of heavily accessed communication variables has very little impact on performance. The variables are frequently accessed so likely in M-state in some cache, and the location of the home node is of little consequence because a requester can use cache-to-cache transfers to get the line. Or at least that's what I thought. Recently, though, I was exploring a simple shared memory point-to-point communication model where a client writes a request into a request mailbox and then busy-waits on a response variable. It's a simple example of delegation based on message passing. The server polls the request mailbox, and having fetched a new request value, performs some operation and then writes a reply value into the response variable. As noted above, on a T5440 performance is insensitive to the placement of the communication variables -- the request and response mailbox words. But on a Sun/Oracle X4800 I noticed that was not the case and that NUMA placement of the communication variables was actually quite important. For background an X4800 system consists of 8 Intel X7560 Xeons . Each package (socket) has 8 cores with 2 contexts per core, so the system is 8x8x2. Each package is also a NUMA node and has locally attached memory. Every package has 3 point-to-point QPI links for cache coherence, and the system is configured with a twisted ladder "mobius" topology. The cache coherence fabric is glueless -- there's not central arbiter or coherence hub. The maximum distance between any two nodes is just 2 hops over the QPI links. For any given node, 3 other nodes are 1 hop distant and the remaining 4 nodes are 2 hops distant. Using a single request (client) thread and a single response (server) thread, a benchmark harness explored all permutations of NUMA placement for the two threads and the two communication variables, measuring the average round-trip-time and throughput rate between the client and server. In this benchmark the server simply acts as a simple transponder, writing the request value plus 1 back into the reply field, so there's no particular computation phase and we're only measuring communication overheads. In addition to varying the placement of communication variables over pairs of nodes, we also explored variations where both variables were placed on one page (and thus on one node) -- either on the same cache line or different cache lines -- while varying the node where the variables reside along with the placement of the threads. The key observation was that if the client and server threads were on different nodes, then the best placement of variables was to have the request variable (written by the client and read by the server) reside on the same node as the client thread, and to place the response variable (written by the server and read by the client) on the same node as the server. That is, if you have a variable that's to be written by one thread and read by another, it should be homed with the writer thread. For our simple client-server model that means using split request and response communication variables with unidirectional message flow on a given page. This can yield up to twice the throughput of less favorable placement strategies. Our X4800 uses the QPI 1.0 protocol with source-based snooping. Briefly, when node A needs to probe a cache line it fires off snoop requests to all the nodes in the system. Those recipients then forward their response not to the original requester, but to the home node H of the cache line. H waits for and collects the responses, adjudicates and resolves conflicts and ensures memory-model ordering, and then sends a definitive reply back to the original requester A. If some node B needed to transfer the line to A, it will do so by cache-to-cache transfer and let H know about the disposition of the cache line. A needs to wait for the authoritative response from H. So if a thread on node A wants to write a value to be read by a thread on node B, the latency is dependent on the distances between A, B, and H. We observe the best performance when the written-to variable is co-homed with the writer A. That is, we want H and A to be the same node, as the writer doesn't need the home to respond over the QPI link, as the writer and the home reside on the very same node. With architecturally informed placement of communication variables we eliminate at least one QPI hop from the critical path. Newer Intel processors use the QPI 1.1 coherence protocol with home-based snooping. As noted above, under source-snooping a requester broadcasts snoop requests to all nodes. Those nodes send their response to the home node of the location, which provides memory ordering, reconciles conflicts, etc., and then posts a definitive reply to the requester. In home-based snooping the snoop probe goes directly to the home node and are not broadcast. The home node can consult snoop filters -- if present -- and send out requests to retrieve the line if necessary. The 3rd party owner of the line, if any, can respond either to the home or the original requester (or even to both) according to the protocol policies. There are myriad variations that have been implemented, and unfortunately vendor terminology doesn't always agree between vendors or with the academic taxonomy papers. The key is that home-snooping enables the use of a snoop filter to reduce interconnect traffic. And while home-snooping might have a longer critical path (latency) than source-based snooping, it also may require fewer messages and less overall bandwidth. It'll be interesting to reprise these experiments on a platform with home-based snooping. While collecting data I also noticed that there are placement concerns even in the seemingly trivial case when both threads and both variables reside on a single node. Internally, the cores on each X7560 package are connected by an internal ring. (Actually there are multiple contra-rotating rings). And the last-level on-chip cache (LLC) is partitioned in banks or slices, which with each slice being associated with a core on the ring topology. A hardware hash function associates each physical address with a specific home bank. Thus we face distance and topology concerns even for intra-package communications, although the latencies are not nearly the magnitude we see inter-package. I've not seen such communication distance artifacts on the T2+, where the cache banks are connected to the cores via a high-speed crossbar instead of a ring -- communication latencies seem more regular.

    Read the article

  • Custom session: Window does not capture full screen area by default. 12.04

    - by juzerali
    I am trying to create a custom session by creating a custom.desktop file in /usr/share/xesessions folder. Remember this is not a gnome or some other session. I have created my own application for this session, which are simple. Case 1 Chrome Browser Contents of custom.desktop file [Desktop Entry] Name=Internet Kiosk Comment=This is an internet kiosk Exec=google-chrome --kiosk TryExec= Icon= Type=Application Issue Chrome browser starts in kiosk mode but does not capture complete screen area. Some area is left at the bottom and right side of the screen. Case 2 Custom pyGTK app (Quickly) Contents of custom.desktop file [Desktop Entry] Name=Custom Kiosk Comment=This is a custom kiosk Exec=~/MyCustomPyGTKApp TryExec= Icon= Type=Application Issue My custom pyGTK app has window.fullScreen() in the code. That means it should open in full screen without the window chrome (and it does under the normal session). But that too, leaves lots of space around it. Need Help Can anyone tell me whats going on here. I think its some issue with borders as pointed out at http://www.instructables.com/id/Setting-Up-Ubuntu-as-a-Kiosk-Web-Appliance/?ALLSTEPS in Step 8 If by chance, Google Chromium is not stretched to the edges with the --kiosk switch enabled there is a simple fix. To stretch Chromium simply log in as your regular user and edit chromeKiosk.sh to not have the --kiosk switch. Then log in as the restricted user, click the wrench and choose options. Then on the Personal Stuff tab select Hide system title bar and use compact borders. Close the options screen and stretch Chromium to fit the monitor. Then go back into the options window and set it to Use system title bar and borders. After this is done, log out of your restricted user (might need to just reboot) and log into your regular user. Edit chromeKiosk.sh back to include the --kiosk switch again and Chromium should be full screen next time you log into the restricted user. If I were to use a custom pyGTK or a gtkmm app, how should I get around this issue. window.fullScreen() should occupy the complete screen area. This has to be done programmatically or in some other way that can scale. I have to deploy this on large number of machines located at different geographical areas. Doing it manually on every machine is not possible.

    Read the article

  • Can start-stop-daemon use environmental variables?

    - by scottburton11
    I need to daemonize a Windows app running in Wine, and create a pid in /var/run. Since it requires an X11 session to run, I need to make sure the $DISPLAY variable is set in the running user's environment. Assuming I already have a X11 session running, with a given display, here's what the start-stop-daemon line looks like in my /etc/init.d script: start-stop-daemon --start --pidfile /var/run/wine-app.pid -m -c myuser -g mygroup -k 002 --exec /home/myuser/.wine/drive_c/Program\ Files/wine-app.exe Unfortunately, my version of start-stop-daemon on Ubuntu 8.04 doesn't have the -e option to set environmental variables. I gather that you could simply set $DISPLAY before the command, like so: VAR1="Value" start-stop-daemon ... But it doesn't work. Since I'm using the -c {user} option to run as a specific user, I'm guessing there's an environment switch and VAR1 is lost. I've tried exporting DISPLAY from the running user's .profile and/or .bashrc but it doesn't work either. Is there another way to do this? Is this even possible? Am I overlooking something? Many thanks

    Read the article

  • Howto get exit code of a script started in screen session

    - by Bettina
    Hi folks, I am currently creating a backup script which uses screen to start a backup job with rsync inside a screen session. The backup jobs are started as follows. screen -dmS backup /usr/bin/rsync ... As soon as the rsync job is finished, the screen session is terminated automatically. To make sure, that the backup was successful, I would like to check the exit code of the rsync job but unfortunately I really don't know how to get the exit code after the screen was terminated. Does someone have a good idea how to automatically check, if the rsync job was successful or not? Would be great if someone does. I already thought about using a temp file but like this: screen -dmS myScreen "rsync -av ... ; echo $? /tmp/myExitCode" but this unfortunately does not work. Then I thought about using stderr like in the example below: screen -dmS myScreen "rsync -av ... 2 /tmp/rsync-sterr None of my ideas worked out so far, since stderr is not written when I use the command above. :-( ? Would be great if someone has a good idea or even a solution. Cheers, Bettina

    Read the article

  • PowerShell: can't modify environment variables

    - by IttayD
    I have an environment variable set via "system properties - advanced - Environment Variables". I modified the variable's value. In cmd, I see the new value. In PowerShell, the value is still the old value. Trying to set it with [Environment]::SetEnvironmentVariable doesn't have any effect.

    Read the article

  • order of operations for environment variables

    - by alyda
    I want to understand how environment variables are set and reset (overridden). I'm running Apache/2.2.24 (Unix) PHP/5.4.14 on a mac . My theory is this: Environment vars can be set in bash, then they can be overwritten with httpd.conf preceding a VirtualHost directive that precedes php.ini, which can then be overwritten by .htaccess (if allowable) and finally by PHP I tried the following: setting environment variable in bash: I added export ENVIRONMENT='local' to my ~/.bashrc file, restarted apache and did not get any output from print_r($_ENV); (in a simple index.php file at the root of my webserver). I also tried putting ENVIRONMENT='local' into /etc/environment, and restarting apache, nothing, as well as /etc/bashrc, restart apache. still nothing. setting environment variable in httpd.conf: I added SetEnv ENVIRONMENT 'local-httpd to the end of my /etc/apache2/httpd.conf file (but before I load other conf files, such as virtual host [Include /private/etc/apache2/other/*.conf]). I now see the variable in the array print_r($_SERVER); but not print_r($_ENV);. setting environment variable in httpd-vhosts.conf: I added SetEnv ENVIRONMENT 'local-vhost to my /etc/apache2/extra/httpd-vhosts.conf file in my generic directive that points to my default document root. I now see the variable has been overwritten (to local-vhost from local-httpd, so I know where the variable is getting set). setting environment variable in php.ini: while searching for a proper place to put my environment variable, I noticed that variables_order = "GPCS" was set to the production value rather than EGPCS. I changed it, restarted my server and found that I was now getting output for print_r($_ENV); but not my expected custom variable. It also appears that I am not able to set a custom variable in this file. Please tell me if I am wrong setting environment variable in .htaccess: I added SetEnv ENVIRONMENT 'local-htaccess'. This worked as expected, overwriting all other values that were set. setting / overwriting environment variable in PHP: if (...) { putenv('ENVIRONMENT=local'); } I'm asking this question because I have a lot of local and remote testing servers, some of which may or may not allow me access to modify httpd, httpd-vhost, php.ini or environment variables. I want to understand what is best for those difference scenarios (shared hosting, heroku, local servers, etc) I obviously don't know how to properly set the environment variable in bash in a way that php can use it, I'd like to know how to do that (as I think Heroku does something similar with heroku config set...)

    Read the article

  • control a bash script with variables from an external file

    - by perler
    I would like to control a bash script like this: #!/bin/sh USER1=_parsefromfile_ HOST1=_parsefromfile_ PW1=_parsefromfile_ USER2=_parsefromfile_ HOST2=_parsefromfile_ PW2=_parsefromfile_ imapsync \ --buffersize 8192000 --nosyncacls --subscribe --syncinternaldates --IgnoreSizeErrors \ --host1 $HOST1 --user1 $USER1 --password1 $PW1 --ssl1 --port1 993 --noauthmd5 \ --host2 $HOST2 --user2 $USER2 --password2 $PW2 --ssl2 --port2 993 --noauthmd5 --allowsizemismatch with parameters from a control file like this: host1 user1 password1 host2 user2 password2 anotherhost1 anotheruser1 anotherpassword1 anotherhost2 anotheruser2 anotherpassword2 where each line represents one run of the script with the parameters extracted and made into variables. what would be the most elegant way of doing this? PAT

    Read the article

  • Using custom variables in Google Analytics funnels?

    - by Matt Huggins
    Google Analytics allow you to view how many users completed funnels through a set of pages in order to reach a goal URL. The service also allows you to pass custom variables when tracking a page view. Is it possible to combine the two, such that I create a funnel based upon the vale of a custom variable set for each visitor?

    Read the article

  • confused about variables in bash

    - by gappy
    I know that variables in bash have no type, but am confused about the value they are assigned. The following simple script works fine in bash #!/bin/bash tail -n +2 /cygdrive/c/workdir\ \(newco\,\ LLC\)/workfile.txt > \ /cygdrive/c/workdir\ \(newco\,\ LLC\)/workfile2.txt However, the following does not #!/bin/bash tmpdir=/cygdrive/c/workdir\ \(newco\,\ LLC\) tail -n +2 $tmpdir/workfile.txt > $tmpdir/workfile2.txt Is there an explanation for this behavior?

    Read the article

  • Idiomatic way to read .env variables in Ansible?

    - by Arms
    I'm provisioning a Vagrant box with Ansible, and using Benno Joy's MySQL role to setup MySQL (including creating a database and users.) The database name and credentials are stored in a .env file in the project's root. What would be the idiomatic way to use these variables when provisioning MySQL? Should I write a custom script that generates a YAML file from my .env, and then use the include_vars module? Or is there a simpler way?

    Read the article

  • Linux environment variables

    - by George2
    I am using Red Hat Linux Enterprise 5. I am always using export command to set environment variable. I am wondering any other ways of setting environment variables and pros/cons of all alternative ways. Any answers or recommended readings? Thanks in advance!

    Read the article

  • Apache: scope for environmental variables

    - by Anonymous
    While there's documentation available on Apache environmental variables, I can not find answer to one important question. Imagine I use rewrite rules to set environmental variable RewriteRule ... ... [E=something:1] What is the scope of "something" - global Apache server (this means "something" will be available for other request transactions), this request (means that "something" is only valid for THIS http request (and its related processing - but what's about internal redirects and other internal stuff - are they considered as THIS request, or another one?), and may be set differently within another (concurrent) request?

    Read the article

  • Enabling Session State in ASP.NET MVC

    - by Erwin
    I'd like to use session variables in my ASP.NET MVC application. I already added the <sessionState> tag in my web.config file like this <sessionState mode="InProc" cookieless="false" timeout="20"> </sessionState> I get a session ID in my url like this if I use cookieless="true" http://localhost:2967/%28S%28hcawmi55zoruuy453fbo3k55%29%29/RmdReqBankAccount But I still can't use session variables in my application. I set the variable like this in my login method: Session["username"] = userName; and I retrieve it like this string user_id = (string)Session["username"]; I get an empty string when trying to retrieve values.

    Read the article

  • Session variable getting lost using Firefox, works in IE

    - by user328422
    I am setting a Session variable in an HttpHandler, and then getting its value in the Page_load event of an ASPX page. I'm setting it using public void ProcessRequest(HttpContext context) { HttpPostedFile file = context.Request.Files["Filedata"]; context.Session["WorkingImage"] = file.FileName; } (And before someone suggests that I check the validity of file.FileName, this same problem occurs if I hard-code a test string in there.) It's working just fine in IE, but in Firefox the Session Variable is not found, getting the "Object reference not set to an instance of an object" error in the following code: protected void Page_Load(object sender, EventArgs e) { string loc = Session["WorkingImage"].ToString(); } Has anyone encountered this problem - and hopefully come up with a means for passing the session variable?

    Read the article

  • Error on windows using session from appengine-utilities

    - by fredrik
    Hi, I ran across an odd problem while trying to transfer a project to a windows machine. In my project I use a session handler (http://gaeutilities.appspot.com/session) it works fine on my mac but on windows I get: Traceback (most recent call last): File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\webapp_init_.py", line 510, in call handler.get(*groups) File "C:\Development\Byggmax.Affiliate\bmaffiliate\admin.py", line 29, in get session = Session() File "C:\Development\Byggmax.Affiliate\bmaffiliate\appengine_utilities\sessions.py", line 547, in init self.cookie.load(string_cookie) File "C:\Python26\lib\Cookie.py", line 628, in load for k, v in rawdata.items(): AttributeError: 'unicode' object has no attribute 'items' Anyone familiar with the Session Handler that knows anything of this? All help are welcome! ..fredrik

    Read the article

  • PHP app with cookie less session does not work

    - by iama
    I am trying to use PHP session without using cookies. I have enabled session.use_trans_sid and disabled session.use_cookies in my php.ini file. I have also disabled cookies in my firefox browser. Now, when I browse my home page, I do not see the HTTP set cookie header in the server response to my page request (using Live HTTP headers). My understanding is that PHP will append session IDs to my request URL when cookies are disabled. Am I doing something wrong? BTW, I am aware using session IDs is not a recommended approach.

    Read the article

  • Clear Session in ASP.Net

    - by Jignesh
    I want to clear the session on Page unload. Here is a condition : If user goes from Page A to Page B of the same site session must not get cleared. If user close the browser window or Tab(close the site),session must gets cleared. I have tried using AJAX PageMethod to call server-side procedure to remove session from client side script.But the procedure is not getting hit,I have checked it using Breakpoint. server side procedure is in master.cs file I will appreciate your help. Here is code in site.master <body onunload="HandleClose();"> <script type="text/javascript"> function HandleClose() { PageMethods.AbandonSessions(); } and here is a code in master.cs : [System.Web.Services.WebMethod] public static void AbandonSessions() { HttpContext.Current.Session.Abandon(); }

    Read the article

  • Lose changed data in session

    - by user150528
    Our asp.net 2.0 application has a very long process (synchronized) before sending response back to client. I observed that a second request, exactly same the initial one, was sent after client IE8 waited response for a long period of time while our application was still processing the first request. I use page session with predefined key to store a flag when the initial request arrives and then starts long process while client IE waits for the response, so if second request comes in, our application checks the session value. After our application sets the session flag and starts processing, I use Fiddler “Abort Session” to abort the initial request, right away the second request (same as the first one) is sent automatically, but session value set earlier seems no longer exist. Any thoughts?

    Read the article

  • Restore Emacs Session/Desktop

    - by Patrick McLaren
    I've been searching for how to restore an emacs session, with no luck. I'm looking to restore all previously open buffers, some of which might contain erc, shells, directory listings, files, etc. Every time I open emacs, I spend a considerable amount of time arranging my buffers; splitting them into rows and columns, opening a shell, arranging irc channels. It takes a while to get onto work. I've tried adding the following to my init.el (desktop-save-mode 1) And then using M-x desktop-save. This only seems to restore files that are open, not shells or anything else running within buffers. I've also checked the following questions (sorry, not able to post links yet): Session management in emacs using Desktop library Emacs session / projects / window management Emacs: reopen buffers from last session on startup? And read through: DeskTop and EmacsSession at emacswiki.org/emacs/SessionManagement Here's a screenshot example of my emacs session. A simple answer would be to just focus on real work :P

    Read the article

  • CRSF token and Session replication with Tomcat and Apache

    - by technocool
    I have an J2EE compliant web application. I use a session based token to append a secondary id to all incoming link generated by my application. To prevent my application against CSRF attack, I validate the secondary id before I allow the user session to work off the subsequent page. Recently, while working with session replication mechanism implementation, I observed that on session failover, the generated secodary id is lost and the user get re directed to the login page/default page. Any suggestions on how I can ensure that the my generated secondary token id is not lost from the replicated session?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >