I want a function to pause, then resume in 30 seconds.
I know it sounds wierd... I have a situation that I need to write a cookie,
but the user does not have rights to drive at the time the asp.net page
loads, and I think this is preventing the cookie from being written. I need
the code to pause, then in 30 seconds write the cookie.....
anyone know if this can be done?
TY
jason shohet 14 9295
Jason Shohet wrote: I want a function to pause, then resume in 30 seconds. I know it sounds wierd... I have a situation that I need to write a cookie, but the user does not have rights to drive at the time the asp.net page loads, and I think this is preventing the cookie from being written. I need the code to pause, then in 30 seconds write the cookie.....
anyone know if this can be done? TY jason shohet
I believe you can do this by getting a reference to the current thread
for your request and have it sleep:
System.Threadin g.Thread.Curren t.Sleep(30 * 1000);
I'm pretty sure that arg is milliseconds, please verify.
--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
System.Threadin g.Thread.Curren t.Sleep (unsure about the exact name but
should be close).
Which drive ? Usually, cookies are handled client side in a location only IE
has to care about. A user is able to choose from several level of security
for cookies (up to no cookies at all in which case you are unlikely able to
to something). AFAIK if you rpovide more information about your usage of
cookies you should be able to work in some of the restrictred levels...
Patrice
--
"Jason Shohet" <__******@yahoo .com> a écrit dans le message de
news:Oo******** ******@TK2MSFTN GP12.phx.gbl... I want a function to pause, then resume in 30 seconds. I know it sounds wierd... I have a situation that I need to write a
cookie, but the user does not have rights to drive at the time the asp.net page loads, and I think this is preventing the cookie from being written. I
need the code to pause, then in 30 seconds write the cookie.....
anyone know if this can be done? TY jason shohet
Jason,
As the other poster mentioned, cookies to disk by the client web browser.
When they leave the server, they appear simply as a HTTP Header, like this:
Set-Cookie: NAME=VALUE; expires=DATE; path=PATH; domain=DOMAIN_N AME; secure
The browser then decides what to do with that text (if anything). Cookies
are also sent back to the server in the same manner.
Therefore, causing the page to Sleep will do absolutely nothing. Please
provide more specific infomation.
--
Alex Papadimoulis http://weblogs.asp.net/Alex_Papadimoulis
"Jason Shohet" <__******@yahoo .com> wrote in message
news:Oo******** ******@TK2MSFTN GP12.phx.gbl... I want a function to pause, then resume in 30 seconds. I know it sounds wierd... I have a situation that I need to write a
cookie, but the user does not have rights to drive at the time the asp.net page loads, and I think this is preventing the cookie from being written. I
need the code to pause, then in 30 seconds write the cookie.....
anyone know if this can be done? TY jason shohet
Thanks guys. To answer, this is what is happening. There's a startup
routine that occurs when a user logs on to their machine. That routine
starts a browser (hidden), which will write a cookie onto the user's
machine. Thats what we want to do...
Yesterday we tried it, and the thing would not write the cookie. Our
hypothesis was that at the time the startup routine is opening the browser,
the cookie cannot be written to the HD ( which doesn't occur for another 15
seconds aprox). My thinking was, cookies get written to IE's folder. If
that folder is not accessible for a particular amount of time, I can try
waiting around, then writing the cookie 30 sec later...
Is the script launched under the user identity ? (how it is hidden, non
interactive mode ?)
If IE is able to connect to your page, it 's really unlikely it would be
unable to write cookies because it's startup. IMO it could write actually in
another profile.
Patrice
--
"Jason Shohet" <__******@yahoo .com> a écrit dans le message de
news:un******** ******@TK2MSFTN GP12.phx.gbl... Thanks guys. To answer, this is what is happening. There's a startup routine that occurs when a user logs on to their machine. That routine starts a browser (hidden), which will write a cookie onto the user's machine. Thats what we want to do...
Yesterday we tried it, and the thing would not write the cookie. Our hypothesis was that at the time the startup routine is opening the
browser, the cookie cannot be written to the HD ( which doesn't occur for another
15 seconds aprox). My thinking was, cookies get written to IE's folder. If that folder is not accessible for a particular amount of time, I can try waiting around, then writing the cookie 30 sec later...
thanks to you, Patrice etc.
FYI just wanted to say, it seems its:
System.Threadin g.Thread.Sleep( 30*1000)
Note, the 'Current' word is no longer there. There is something called
CurrentThread, but it does not have the Sleep() method :)
Thanks guys. To answer, this is what is happening. There's a startup
routine that occurs when a user logs on to their machine. That routine
starts a browser (hidden), which will write a cookie onto the user's
machine. Thats what we want to do...
Yesterday we tried it, and the thing would not write the cookie. Our
hypothesis was that at the time the startup routine is opening the browser,
the cookie cannot be written to the HD ( which doesn't occur for another 15
seconds aprox). My thinking was, cookies get written to IE's folder. If
that folder is not accessible for a particular amount of time, I can try
waiting around, then writing the cookie 30 sec later...
Is the script launched under the user identity ? (how it is hidden, non
interactive mode ?)
If IE is able to connect to your page, it 's really unlikely it would be
unable to write cookies because it's startup. IMO it could write actually in
another profile.
Patrice
--
"Jason Shohet" <__******@yahoo .com> a écrit dans le message de
news:un******** ******@TK2MSFTN GP12.phx.gbl... Thanks guys. To answer, this is what is happening. There's a startup routine that occurs when a user logs on to their machine. That routine starts a browser (hidden), which will write a cookie onto the user's machine. Thats what we want to do...
Yesterday we tried it, and the thing would not write the cookie. Our hypothesis was that at the time the startup routine is opening the
browser, the cookie cannot be written to the HD ( which doesn't occur for another
15 seconds aprox). My thinking was, cookies get written to IE's folder. If that folder is not accessible for a particular amount of time, I can try waiting around, then writing the cookie 30 sec later...
Patrice,
I've got another way now to do it, i don't need to do it in the startup
script. It seems that the application variable %COMPUTERNAME% can be used
in the querystring to give me the machinename, when the application is
called. I'm having another issue related to this (I just posted it), but
I'm much closer now to what I want to do and don't have to worry about doing
this in a startup script. TY This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Paminu |
last post by:
Is there something like system("PAUSE") for linux?
|
by: Wim |
last post by:
My GUI application starts a process (a console program) when the user
hits Play. I would like to add an option to pause that process. The
code I've added to detect if the user hit pause/unpause seems to work.
But I have no clue how to pause/suspend the process. As far as I can
see the Process class doesn't offer anything for this. So it's...
|
by: exshige |
last post by:
I read from some book that you can actually on any tag in the html page put
a onClick or something and assign it with the sub/function name that is in
the codebehind. I tried but it say name undefined.
I am trying to make a rollover effect using codebehind. I have a <a> tag
that onmouseover will call a sub in codebehind to change a...
|
by: Rob Shorney |
last post by:
Hi,
I am using .Net 2003 , c# asp.net.
The situation i have is this. I have a asp.net page which in the codebehind
maintains an xml document in memory. The user can click on a button to popup
a windows to select some items, this is done via window.open, I then return
the selected items via the returnValue, when I receive the data back I...
|
by: Jackie |
last post by:
I just want the programme to stop for a while.
Thanks.
| |
by: eSolTec, Inc. 501(c)(3) |
last post by:
Thank you in advance for any and all assistance. Is there a way to start,
pause and resume a recurrsive search exactly where you left off, say in the
registry programmatically?
--
Michael Bragg, President
eSolTec, Inc.
a 501(C)(3) organization
MS Authorized MAR
looking for used laptops for developmentally disabled.
|
by: steveyjg |
last post by:
I'm trying to call a function that will pause execution for 30 seconds and have a counter timer counting to 30 seconds during this pause. When the counter hits 30 execution of the program will continue.
So far I have tried:
Public Function timeDelay()
timerCounter = 0 'global variable
Timer1.Enabled = True
End...
|
by: Lloydm |
last post by:
I've used the command "pause" in batch files which works ok but I guess it's applied dirrently in c++.
Using Dev C++ 4.0 and the following is my code
#include<iostream>
#include<iomanip>
#include<cstdlib>
#include<string>
main(){
|
by: nma |
last post by:
Hi
This code goes well with play, stop and fullscreen button, the only thing is the pause button is not there. How to make pause button? I try to make pause button but when it streams video, when I click pause, it stop but it work play again when i click at play button.
Please help.
<?php
function printInstructions() {
?>
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |