Database Calls, Server Transfers, Sessions, And Cookies

Any body know of a resource that compares/benchmarks the expense (in terms of milli seconds, or server load) of using various programing options?

I know a lot of articles and forum posts reccomend best practices between functions and programming options, but I would be interested in some type of definitive benchmark to decide between various prgramming options, depending on the need.

For example, I can call a Recordset and quickly write it into an array, so that the connection can be closed even before I write the data to the HTML page. This would save conection time and server resources, but I'd like to be able to judge the worth when considering coding it.

Every time I do a Server.Transfer how expensive is it to the server? How much am I loading the server with Session varaibles? If I store some info in a cookie, but have to call it, how long will that take? Am I using up server resources by creating large arrays?

View Replies


ADVERTISEMENT

ASP Server Calls

I am using WindowsXP and a book to try to learn ASP.

The book instructed me to install IIS & .Net Framework v1.1 (which I did)

In the book they gave me the following code:

View Replies View Related

Optimizing Asp Database Calls

I'm very interested in finding out what ways you experts out there have made your data dips more efficient in your asp (not asp.net) code.

I have a wizard-type application that dips into the database with each page, I know there's a better way to do this out there, just pressed for time and can't think right now.

View Replies View Related

Database Calls Made

Is there a way I can see how many database calls were made from my script to the db server to check how well my SQL queries are formed?

I get the time taken to execute the queries, but in that time taken, I want to know how many calls were made to the DB server. Is it possible?

View Replies View Related

Cookies N Sessions

Using Session("variableName") to store data for the duration of a session. And using Response.Cookie("nameOfCookie") to store data as a "cookie" in ASP.....some questions here....

Session Variables. There's no disabling that CLIENT-SIDE is there? ASP Sessions are managed by the server, so as long as it's running fine, there's nothing the client can do to stop session variables from being created right?

"Session" Cookies? When using Response.Cookie, is that data actually written to the client's HDD like Javascript cookies would be? I noticed in MSIE 6 you can goto TOOL > INTERNET OPTIONS > PRIVACY > ADVANCED and Overide Session Cookie settings, but they don't seem to work.

I UNCHCKED to ALWAYS ALLOW SESSION COOKIES, and then did a

Code: ....

View Replies View Related

Sessions Or Cookies ?

i'm creating a shopping cart and i need to know when users add products to their shopping cart, does it load a session for each visitor, which when a new customer tries to add it opens a session for him and he closes the site the session closes enabling another visitor to start with an empty basket ?

or does it use cookies instead of sessions ?

my shopping cart does not work properly...
i need to fix it in this way, when a new visitor tries to add products to the shopping cart it doesn't display the previous products of the previous visitor.

noting that i'm not using any registration as yet......

how can i fix that?

i have a file called shop.asp which list the type of products available in the database and then when a type is clicked a list of products under this type will be displayed, then customers can add to the cart whatever they want.....

but this does not work properly because if another user tries to access the cart he'll see the previous products in there....

View Replies View Related

Sessions & Cookies

I want to do something very simpel. Make a part of my website available
only for users with a username and password. The site is mainly ASP
based. The webserver is an IIS6 and I do NOT have access to server
settings (session timeout, security,...).

I use sessions to set the validation for the users. Basically you are
redirected to a form where you can give a username and password, this is
validated with the values in a database. If the password and username
are ok a session value is set <%=Session("Validated")=True%>*.

At the beginning of each secured page I start with:
<%If Session("Validated")=False Then Response.Redirect("Login.asp") End
If%>

So if the session value "validated" is true you can see the secured
pages, else you are redirected to the logon page.

The default timeout value for session is 20 minutes. Because the session
should stay alive during the complete time of the visit I was thinking
of puting the session.timeout to 60 minutes. I set this at the beginning
of every secure page: <%Session.timeout=60%>

Now, Users keep on contacting me saying that they have to relogon quiet
often. This also seems to happen when a user is not on the website for
20 minutes already (session expired). I tested it myself and have the
feeling the I am indeed regularly redirected. Sometimes after 10
minutes, other times 30 minutes, ... There seems not to be any logic in
the time that users are redirected to the logon page.

Because the website is used to fill in a lot of long HTML forms, it is
very frustrating for the users when they are completing a form and then
pressing "Submit" being redirected to the logon page and lose all
entered data.

Is there somebody who can give me more info on the strange session
behavior? For me it is not normal that a session times out in that
unlogic way.

The only solution I can think of is passing the post information to the
logon page and then redirect after validation back to the transaction
page.

How can you reset the timeout counter on a session in ASP? What I was
thinking was that I am doing it maybe wrong?

Now the session variable that let a user have access to the site is set
once at logon time: (<%=Session("Validated")=True%*>*). Then it is
checked on every page that the user opens (<%If
Session("Validated")=False Then Response.Redirect("Login.asp") End If%>)

Would it be a good idea to re-set the variable every time a user
accesses page? Like <%If Session("Validated")=False Then
Response.Redirect("Login.asp") Else Session("Validated")=True End If%>
Would this reset the timer that times out the session? Or do I have to
add something like <%Session.Abandon%> before setting the variable
again?

What would this do on the server performance?
Is this a good way of working with sessions?

Swicth to cookies i.o. sessions?

I am open for all suggestions, please help! In the future there are also
money transactions going over this website, so it has to be a secure
method! I will use a seperate HTTPS host for this.

View Replies View Related

Database - Recursive Function Calls

..:: The Specs:

MS Access 2000 (host charges extra for SQL/MySQL)
MS Windows Server 2003 (prod) / MS XP SP1 (dev)

..:: The setup:

The database has been setup with two tables;

tblDownloads
tblCatagories

Each "download" consists of a catagory field that corresponds to fldID in
tblCatagories. Each catagory, where the catagory is a parent, has a parent
field of value: 0 and each child, has a field with a value corresponding to
the fldID of it's parent. Code:

View Replies View Related

Log Out Securely Without Using Sessions Or Cookies?

I have a button that takes me back to my login screen but the user can press back and get back in. I have done some research and looked around and the only way i have found is using sessions-by creating and loosing sessions.

I however use neither and pass my username via a textbox.

Is there a simple way to somehow logout securely without allowing the user to enter the back button?

View Replies View Related

Sessions Without Cookies Question

UserA has a PC running IE 6. This has the cookies disabled:

1 - Override automatic cookie handling: checked
2 - First party cookies: Block
3 - Third-party cookies: Block
4 - Always allow session cookies: Unchecked

The server runs a Classic ASP application running in IIS 5.x that uses the
session cache. These are different machines running within a LAN.

When UserA accesses the website, the ASP code retrieves some data from the
DB and puts it into the session cache and timestamps it (to give it a
time-to-live value).

When UserA accesses the site again, the ASP code checks the value of
Session("DatabaseSettings_DateAccessed") to see if the cache has expired.

Bizarrely, it picks up the correct date set on the previous visit.

I would have expected that, since UserA does not have session cookies
enabled, there should be no existing session identifier available for UserA.
So, how is IIS recognising UserA's session?

View Replies View Related

Cookies Or Sessions Authentication

Customer wants users to authenticate based on where they came from. They have several locations that the users will be coming from. They don't want anyone to be able to access their website from anywhere other than these locations. The locations ip addresses will be changing regularly. Is there a way to have a page on the INTRANET internally that the users will go to and it will start a session or place a cookie and pass them to the website. The website then looks for that session or cookie and lets them in or denies them based on the session or cookie. The sites that they will be coming from are ASP and .NET servers and it encrypts the URL that it is coming from. The website it is going to is on a PHP server and is built on PHP and MySQL. I have asked this in like every forum on the internet I can find and no one seems to have a solution.

View Replies View Related

Cookies/sessions Will Not Die - Browserhawk Test?

Its strange...I have experimenting with browser hawk by using the cookie sniffer method. However, even If adjust the security slider level in internet options or goto advanced in the privacy tab I cannot seem to prove the condition below....it is almost as if cookies don't want to die in my testing environment.

I did try closing the browser and relaunching but cookies and session ids seem alive and well....is this the usual hassle with testing cookies/sessions?

Option Explicit
Dim bh
set bh = Server.CreateObject("cyScape.browserObj")
bh.SetExtProperties "cookie_both"
bh.GetExtPropertiesEx

if not bh.cookiesEnabled then
response.write "COOKIES DEAD"
end if

View Replies View Related

Carrying Form Values Without Cookies Or Sessions.

Is it possible to send form values from PAGE1 to PAGE2, and then retain the
form info for PAGE3 without using cookies, sessions or DB storage? Also, I
dont want to repost page2 to page3 using hidden form fields.

Just curious! Want to know how to "simply" maintain user form inputs across
a web site even when security and privacy controls are set to MAXIMUM on the
browser. I know using databases would do it, but I would love to find a
simpler solution.

View Replies View Related

How Do You Make Asp Sessions Work If Cookies Are Completely Disabled?

As I understand it IE stores the session id in a cookie on the user machine.
This identifies the session between pages.
If cookies are disabled then session variables don't work...

Is it possible to pass the session id between pages by posting them etc, and
manually force the session id on each page.

View Replies View Related

Sessions To Database Sessions

We are planning to set-up a load balanced web environment. Accordingly, we are going to change the session management on our website from the classic ASP Session State and session variables, to a database method.

Does any one have any pointers as to how I might approach this, so that I can have the same sort of functionality the ASP sessions give without having to create database columns for each session variable I wish to create. I am thinking along the lines of some serialised dictionary or something that I can stick in a blob column.

View Replies View Related

Asp Transfers

I have been playing with the Server.Execute and Server.Transfer as well
as server includes.
I know that these are not all the differences, but one of the
differences between Server.Execute and Server.Transfer is that
Server.Execute will include the file into the calling file and the whole
file (Calling file with the included file) will display. In
Server.Transfer, all the first file up to the Server.Transfer and the
whole file that is transfered to will display. In Server.Execute, the
first file is still in control whereas the page that we are transfered
to will be in control. Also, in the Server.Transfer the URL will
display the URL of the first page, including any "GET" form variables.
Is there a way to do what Server.Transfer does, except if we transfer to
another page - all display from the first page is dropped. This might
be for an error, where we decide there is an error and want to transfer
to an error page and not show any of the headers or data of the first page.

View Replies View Related

ASP.NET Large File Transfers

I am attempting to use the technique in KB 812406
(http://support.microsoft.com/?kbid=812406) to transfer
large files via Response.OutputStream.Write.

It works GREAT in in debug mode. But whenever I set
debug="false" in the web.config file clients get cutoff after about 1.5 minutes.

There is no error raised the client simple gets an incomplete file.I've tried playing around with various timeout settings in web.config and in IIS with no luck.

View Replies View Related

Server Farms & Sessions

Has anyone used any session replacment components for use in a server farm environment?
I've seen the XML COM+ Session replacement object. Has anyone used it? With success? Any alternatives?

View Replies View Related

Sessions On WIN2K Advanced Server

I am trying to debug an issue with sessions in my ASP 3.0 web
application, which runs fine on WIN2K Pro and WINXP Pro, yet fails to
function correctly on WIN2K Advanced Server.

My actual application is using sessions to store username, and security
level (permissions) for my application. The default.asp page is the login,
where these values are set. I have triple and quadruple checked my IIS
Settings to make sure "Enable Session State" is checked, and the
session.timeout is set to 120.

Now if I remove my application, recreate it
in IIS admin, stop and start the IIS services, and run my application, the
session variables seem to be saved across the first redirect to my
main_menu.asp page. Here I have several menu choices, which are dependent
on the session("seclevel") to determine which they can or cannot access.

Here is where it seems my session vars are lost, since when I click on any
choice, I get redirected to the log_out.asp page, which abandons the session
and returns the user to the login (default.asp) page. Code:

View Replies View Related

How Many Max Cookies Can We Create In Server

How many Max Cookies can we Create in Server.

View Replies View Related

ASP Cookies From Access Database

Question. Can a cookie in ASP be assigned a value from Access database by directly accessing the database?

The idea is this. I have a form that a user fills out. The form is submitted and entered into my Access database. What I want is for the form to be emailed automatically to the user who just completed the form. To get to the form the user must first login in and the login info is stored in another Access db. So I already have the email address for the user.

So the diea I had was to use cookies and already existing email address for the user in my Access db to email the forms.

Is this possible? Does this even make sense?

View Replies View Related

Display Session Objects, Cookies From App On Other Server

I'm writing a reporting application in ASP.

I want to have links to a CF app - specifically VeriSign's eCommerce
Manager (on VeriSign's server).

The links in my app will need current values for CFID and CFTOKEN in
their HREFs - I think these are cookies or session objects the
VeriSign/CF app sets once logged in, they appear on the url.

Assume user has logged into VeriSign manager before my app.

View Replies View Related

Recursive Calls

I have implemented a logic for my requirement with a recursive call. The logic is I need to get IDs from database for a scenario. There are corresponding records for each ID.

I need to store these IDs in an array variable. Then I need to get (dependent)IDs for the fields in each ID. There may be morethan one dependent per each ID. I append these IDs to my array. Like this it goes.

The problem is if there are many levels like this, the number of database cursor count is reaching to maximum and I'm getting the error

{Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC driver for Oracle][Oracle]ORA-00604: error occurred at recursive SQL level 1 ORA-01000: maximum open cursors exceeded }

each recursive call runs a SELECT query.

Can any one suggest me an alternate solution for this ?

View Replies View Related

Function Calls

I'm terribly sorry if this has been asked before, but I need a clear explenation without having to sift through other bits of information.

Can somone explain how functions work in asp (not asp.net)? I need to call a function that returns a value, and I get an error when I have a return statement in there. If there is no "return" statement, then what do you use to get this value back?

View Replies View Related

How To Use IIS To Redirect Http Calls?

I need to implement an application that receives http calls from a remote
client, do something with it and returns some feedback. I want to use IIS
(version 6) as my front end http server (with https and ssl services) which
will facilitate all the requirements of a http server and then foreword the
incoming call to my application and will return the process result to the
client at the end.

Does IIS support this? And if yes - what are the requirement from my application to use it (built in .net if anyone interested)?

View Replies View Related

Session Storage Vs. Frequent DB Calls

I'm developing web surveys where users logon to a web survey and answer up
to about 50 questions, one after the other, shown only one question at a
time. The answers are saved in a database.

A fellow developer and I are discussing when is the best time to save the
answers. We have two approaches in mind:

Approach 1:
After each question is answered, the answer is saved in the database.
Sessions are only used to store the User ID.

Approach 2:
After each question is answered, the answer is saved in a session variable.
When the user has finished the entire survey, all the answers are saved at
once in the database. Also, if the user logs out, or if the session times
out, the answers answered so far are all saved in the database at once.

The amount of actual data sent to the database is the same in both
approaches, but Approach 1 have much more frequent calls to the DB, thus
creating an overhead of opening and closing connections. I'm not sure how
significant that is. On the oter hand, Approach 2 store a lot of data in
sessions. I'm not sure how bad a thing that is.

Which approach is better and for what reasons? I'd be happy to supply more
information if needed.

View Replies View Related

Correlate ASP Page With Timings Of Its DB Calls

I am looking for a tool/product (commerical or shareware) to correlate
classic ASP pages (not ASP.NET) with timings of ADO calls made from
each ASP page. The information I am looking for are

T1, url = http://..../product.asp,
DB Server=SQLSvr1, DB Name=products
ADODB.Connection.Open 10ms
ADODB.Recordset.Open 189ms
...

T2, url = http://.../search.asp,
DB Server=SQLSvr2, DB Name=productindex
ADODB.Connection.Open 15ms
ADODB.Connection.Execute 350ms
...

It would be nice if the tool can automatically rewrite existing ASP
pages if necessary.

This would be a good performance monitoring tool for classic ASP
pages.

View Replies View Related

Cursor Count Problem In Recursive Calls

I'm using the following function, which uses a recursive call. every time when I get a conf it opens a record set. So increases the cusor count. Some times I'm getting the following error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC driver for Oracle][Oracle]ORA-00604: error occurred at recursive SQL level 1 ORA-01000: maximum open cursors exceeded.

How can I avoid this ? Code:

View Replies View Related

Multiple Calls With Inet Object Causes Site To Lock Up

I developed a website that posts data to another url via the Inet object.

I should mention that the posting code is wrapped in a VB 6 dll, and that
dll is called from ASP. Code:

View Replies View Related

Creating Cookies In Global.asa Session_OnStart But Cannot Read Cookies On Subsequent Pages.

In my Session_OnStart in Global.asa, I am setting some cookies. One
of them, I set as follows:

dim UserID
UserID = Request.ServerVariables("LOGON_USER")
Response.Cookies("User")("ID") = UCASE(UserID)

When I immediately log the cookie value retrieved from
Request.Cookies("User")("ID") into the Windows Event Log, I get the
correct value. However, when I try to retrieve the cookie on the home
page of my application using the same code,

Request.Cookies("User")("ID"), it either cannot find the cookie or
cannot read the value. I am retrieving the cookie before all HTML
headers are written. It is my first statement on the page after
Option Explicit. I have even compared the session IDs. The SessionID
created in the Session_OnStart is the same value as the SessionID on
the home page.

I have read that the Session_OnStart only has access to the
Application, Session and Request objects. It does not explicitly say
that it does not have access to the Response object. Also, I was even
able to use Response.Write's in Global.asa to print out the values
although it looked like it had also stopped the session after I did
so. Cookies are definitely enabled on my machine. I have even tried
setting the session cookie's expiration to be persistent for a few
days to see if it was perhaps expiring before I was able to read it
but this did not work either.

Is there something preventing cookies to be created in Global.asa in
the Session_OnStart sub? Is the Response object not available???
Please let me know if anyone else has had this problem or solution.

View Replies View Related

Enable Permanent Cookies But Disable Session Cookies

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?

View Replies View Related

Creating Cookies File And Stored In Cookies Folder

I m creating a cookies in my application and it work properly but i can't see the cookies where it will sotred i checked the cookies folder but i didn't find that I want to create a cookies file as the other web site create and store where other cookies will stored in Cookies folder or Temprory Internet files folder eg:1. arvind@google.co[1].txt this stored in cookies folder 2. arvind@msn[2].txt ....

View Replies View Related

Database Connection String To MySQL-database On A Different Server

I work with ASP for several weeks now and i really like it! But until now i have just used it in connection with my localhost. I made connections to a SQL Database and to an ACESS Database with using the ODBC Tool from WIndows!!


Now i want to publish my website but i don't know how to handle the connection string kind of thing. My MySQL-Database is on a different server than the website and i need a connection string where i can type in the server, a password and a username and it should then connect.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved