473,499 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

If using Cookies Inline in ASP page is Safe???


Hi,

I am making use of cookies to store the Session State information
through JavaScript as given below in an ASP Page. Suppose I have XYZ.asp
page. The code in this page goes as shown below.
************************************************** *******
<%
'Remark: ASP Code here
dim staffID
dim TaskCD
set objFile = server.CreateObject("PTSUFILE.PTSUFILESRV")
%>
<Script language="JavaScript">
var environment;
var physicalpath;
var userid;

environment = window.opener.document.FORM.as_environment.value;
physicalpath = window.opener.document.FORM.as_physicalpath.value;
userid = window.opener.document.PTSFORM.as_userid.value;

document.cookie="Environment=" + environment + "";
document.cookie="PhysicalPath=" + physicalpath + "";
document.cookie="UserID=" + userid + "";

</Script>
<%
'Remark:ASP Code Continues Here
'Remark:Get the physical path from cookies and set cookievalue to blank.

Dim physicalpath
physicalpath = Request.Cookies("physicalpath")
Session("StrPhysicalPath") = Cstr(physicalpath)
Response.Cookies("physicalpath")= ""

************************************************** *******

Here I am trying to get the Session data from an previous page into a
new opened window ASP page throuh javascript.

And I am doing it so becos, I am sharing my session data across asp and
aspx pages in the same application. So i have a custom session object
which I fetch and store in oracle 9i database each time a request is
made to webserver.

I just want to know if I set the Response.Buffer Property on the top of
asp page to true. And use the above inline JavaScript code to store data
like Path, UserId in cookies. Again then fetch this data immediately in
the next line in ASP code from cookies and then set the cookies to
nothing. Is this way of using Cookies to store the session data is safe.
As I am immediately destrying the cookie data once I get it in my asp
page for use.

Please reply ASAP...
Thanks in Advance !
Regards,
Amit
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
0 1502

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3211
by: Shawn Wilson | last post by:
Hi, I've created a PHP file called filename.jpg. It outputs a JPG. I've set up a .htaccess file to force the filetype to PHP. The file is displayed in a page on a browser. I cannot get the...
0
11519
by: Antwerp | last post by:
Hi, I'm trying to create a perl script that will log into a website (the login form uses POST), navigate to several pages, and append the (html) content parsed from those pages to a seperate log...
9
2521
by: | last post by:
Is it possible for a user to enable permanent cookies but disable session cookies.....this seems like a contradition yet this is what I appear to be reading in online articles?
6
3023
by: Mark | last post by:
Hi... I've come across some weird bug with Response.Cookies. Or maybe it will be called "by design" but for the life of me I can't figure out what purpose it would serve. If you're setting a...
1
1828
by: Bhupesh Saini | last post by:
I am trying to call a ASPX page using HttpWebRequest class and pass cookie information to it. My ASPX pages gets called just fine, however none of the request cookies are available to the ASPX page....
5
1392
by: Ryan Ternier | last post by:
Hey! We need a solution for a problem. We're designing a site where users hate... absolutly hate... with a passion to sign in with a user name / password system. They want to sign in once, and...
2
8762
by: barrybevel | last post by:
Hi, I have a very small simple program below which does the following: 1) post a username & password to a website - THIS WORKS 2) follow a link - THIS WORKS 3) update values of 2 fields and...
1
3930
by: comeshopcheap | last post by:
Hi I am using this script to access doba.com (I need to download some files) but I keep on being sent back to the login page not the user home page. Any help. I think I may need to use a post...
3
3134
by: Inny | last post by:
I want To offer a login Option, two Checkboxs, 1 labeled 'normal' the other labeled 'Forever'. I want to assign the check boxes to switch between the cookie script below (normal) and An altered...
0
7131
marktang
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,...
0
7007
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...
0
7220
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7388
tracyyun
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...
0
5470
agi2029
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,...
1
4919
isladogs
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...
0
3099
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3091
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.