Best Practices For Cookies In Classic ASP - Memory Usage

When using cookies in classic asp, is it safe to assume that using a comma delimited list of values in one cookie is much more efficient than using multiple cookies? (example below)

Response.Cookies("someCookie") = "101,102,103,104,105,106"
If InStr(Request.Cookies("someCookie"),"103") 0 Then.......

vs.

Response.Cookies("101") = "True"
Response.Cookies("102") = "True"
Response.Cookies("103") = "True"
Response.Cookies("104") = "True"
Response.Cookies("105") = "True"
Response.Cookies("106") = "True"
If Request.Cookies("103") = "True"

Then.....

View Replies


ADVERTISEMENT

IIS6 W3wc.exe Memory Usage.

I have a problem with our web servers and memory etc.

We have one application pool with a few websites in it and the w3wp.exe is
consuming about 800 mb memory now.
First we had a rule for recycling the application every x minutes or when
it's using more than 600 mb memory but when the recycle is activated the
w3wc.exe process hangs and the cpu usage goes to 100% until we execute an
iisreset.exe.

That's the reason why we disabled all the recycling options and configured
only one worker process for that application.
All the websites in the application pool use the same code, only they have a
different skin.
The website also uses xml/xsl transformations.

Is it normal for an application to push the w3wc.exe process to about 1GB???
If this is the case i really want to know how much memory dedicated hosting
companies need in their webservers :-)

We are storing some information in the application cache, but this is only
for the entire website and not per user... in plain text so the amount of
data would be no greater than 100KB at most.

The application is in classic ASP.
We walked thru the entire code and checked for correctly closing all sql
recordsets, email components etc etc etc...

What is the best approach to find out what is using so much memory and why
the recycle does not work correctly?

View Replies View Related

Memory Usage Of Managed Objects

I am in the process of writing a simple web server monitor (ASP.Net with
VB.Net). One piece of useful information for me to gather would be the
amount of memory used by objects stored in the cache, since objects are
thrown in there left and right.

Items in the cache are either custom objects or are Hashtables. How can I
get the memory size of these objects.

Marshal.SizeOf(object) does not work in this case because .Net cannot
Marshal Managed objects. I thought that I might be able to pull out the
component items in each object and build the total size from their aggregate
sizes, however that would require me to determine each objects type so that I
can correctly gather size info from the internal attributes, something that I
do not want to do.

Is there a generic way to either:

1) get the size of Managed Objects

2) convert Managed Objects into Unmanaged Objects that can be marshaled?

OR

3) some other way to get memory sizes of cached objects

View Replies View Related

How Can A Measure Server Session Memory Usage?

How can a measure server session memory usage?

I have a 20-30 session variables and I would like to know how much they memory they consume then multplied with my projected user load.

View Replies View Related

Memory Resident Only Cookies?

I am trying to beef-up the security when passing data between pages. I am currently using the following code to navigate between some of my pages.

<a href="javascript: GetFormValue(FRMTRANSFERS.TXTHOSPITALID,'ADDPATIEN T');">
<SCRIPT LANGUAGE="JavaScript">
function GetFormValue(FField,StrPage)
{
var myField = FField
var myNumber = myField.value
self.location = StrPage + ".asp?ID=" + myNumber;
}
</SCRIPT>

I would rather use cookies to do this but i need to know if you can create a cookie that doesn't get written to the harddrive. I can't use session variables as i can't write then in Javascript - at least i think not -

View Replies View Related

ASP Debug In COM (vb) Best Practices

I typically use a VB com component for handling business logic and data processing in my ASP projects.

In the past, if I wanted to get a forms contents into my VB layer I would simply pass it in the call and accept it in VB as a string which I could put into an xmldom object.

I am now experimenting with passing the entire form along as a form object (to be accessed as such in VB as a ASPTypeLibrary.Request type.

I have found two ways to do this.
1. pass the form as above using the listed request type in VB. This works great.
2. Dim up a ASPTypeLibrary.Request object in VB and assign it
GetObjectContext.Item("Request").

Using GetObjectContext is much more difficult to implement if you want to have debugging ability in VB (there are numerous security considerations).

My question is (and thank you for reading this far), do any of you know what the best practices is for a production environment? Can anyone think of any reason why I shouldnt just use the easy method (pass the form and define its type in the argument list for the sub or function)?

View Replies View Related

Using Patterns And Practices

I have a asp webapp that must use a .net dll (with com wrapper) that in turn
uses the patterns and practices libraries (june 2005 version) to access to
the database.My asp webapp can properly instantiate the c# dll, but I do not know how to
set the data needed to access the db. In asp.net I can add the configuration
info to web.config, pointing to a dataconfiguration.config and all works fine.
How can I put the needed info in the ASP configuration?
If it is not possible to do so, how can I set a single configuration file
for the enterprise library, provided that their dll are in GAC and that the
can be called from c# exe, asp.net webapps and asp webapps and all of them
should share a single configuration?

View Replies View Related

Connection To Db Best Practices

What are the best practices when using a db and include files?

I typically store my connection string in an include file. I then open my db do what I need to and close the connection. I haven't put these in functions. How does everyone else handle the connections are the in functions? in includes?

View Replies View Related

Best Security Practices

What are some best practices for classic ASP security? Can you point me to some "how-to" articles in this regard?

View Replies View Related

SECURITY: Best Practices For Handling Connection Strings

I saw a brief blurb on this somewhere and am unable to recall where...

In the context of Security, what are some best practices for
handling -storing, locating, retrieving- database OLEDB connection strings?

I have typically used a single include file and even considered stuffing the
string in a document (XML or otherwise) outside of the root directory. I
know of and have used methods to store connection strings in the registry of
the server. My thinking is the optimal solution involves some form of
encryption and locating the string outside of the site itself. Code:

View Replies View Related

ASP And SSL Usage

I have a client that wants a web form to send credit card information and other personal information to an email address. (such as name@aol.com) Now I am uncertain on how to do this. I know SSL must be involve, but what is the process with this and how to use it with ASP ? How do you use SSL with ASP .

View Replies View Related

ASPEXEC Dll Usage

I am building a small Web app that will allow end users to visit a Web page, click a button which will in turn execute a batch file on the Web server which will migrate code from the development environment to QA. The Web app will also capture logins and execution requests, and the batch file currently emails the robocopy log to me.
In researching ways to get the ASP page to execute the batch file, I came across ASPExec from Server Objects - http://www.serverobjects.com/products.htm#free. It seemed straightforward enough, however I have not been able to get the permissions in sync for it to work.

View Replies View Related

Monitoring Usage

I have just figured out how to use the global.asa file to track sessions on my site. However it relies on users logging off correctly. Is there no way that I can know that the user has closed the browser WITHOUT logging off my site? I am finding users registered as being logged in when they may not be
Could anyone show me some code that I could put in Session_OnEnd that would clean up my database table of active users? Say if a user has been in-active for 60 minutes, clean him out. I have tried to do this but it hasn't worked. I cannot seem to connect to my access db from the global.asa file!

View Replies View Related

Database Usage

i have an access database which iv'e designed for my 'client' (ok, he's my friend) and now i'm also in the process of designing a website for his company - so his customers can log on and see their order status.

what's the best (and most secure) way to update the site - we don't host the site - it's hosted by someone else.

i'm totally at loss with this - since iv'e never worked with networks or servers and i just want someone to point me in the right direction. i don't want to get lock errors and the like.

iv'e heard a bit about ADO and i know some of the syntax although i'm not really sure how it applies to me here (i'm not exactly exposed to ADO since iv'e been learning asp.net 2.0 from which i understand, has totally eliminated ADO)

View Replies View Related

Proper Usage

What is the proper way of using html in asp

Response .write "<td>"& variable & "</td>"

or

<td><% Response.write (variable)%></td>

What difference does it make?I am building a table whose number of rows keep changing
When i use the second method the space above my table keeps increasing.I just want to know which method is better..I had posted a similiar question....I'm still trying to figure out.

View Replies View Related

ASP Session Usage

I'm currently working on a survey system that allowes users take the survey and then review/change their answeres in any order. The system uses 3 frame (Header,Body,Footer).

As it stands the system uses 3 sessions to get this done. One for the project they are in, one for the step they are in and one for their answers.

My question is at what point do I end up over whealming the system with sessions? I truly do not want to slow the system down that much. how I could optimize the usage of this?

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

Session Variable Usage

Is there a way to use a Session Variable to prevent the successful resubmission of a form if the user uses the Back button and tries to submit it again?

View Replies View Related

Display The Current CPU Usage

Does anyone have working ASP code that shows CPU usage on the server where it's running from?

View Replies View Related

Response.write Usage

Hi's there any concerns or disadvantages of using alot of respose write's (50) in a ASP page for calculations and is it better than using the recordsets to do the calculations?

Also, we are looking at moving to a secure server, will this cause any problems apart from changing all references to https?

View Replies View Related

Dynamic Input Box Creation And Usage

Can anyone point me in the right direction for dealing with a dynamically created table of shopping cart items? Each row (or Item) has a column where the user can change the quantity. Is there an easy way to grab and use these changed values when they hit the form submit button?

Or, do I need to bite the bullet and write code that filters through the form fields named "quantity1," "quantity2," "quantity3," etc... And then determine which one goes with which cart item?

View Replies View Related

Avoiding Concurrent Usage Of An ASP Page

I have 4 ASP pages where an user can update some fields and submit the page, so that the fields are updated in the Database(Sqlserver), I need to handle one situation.

1) At a time I need to allow only one user to update the details in a page.

2) I need to stop other users who are trying to access the same page concurrently(probably with a message or Redirecting to other page where he can see the details in a report format).

3) Session timeout in my application is 60, So if the first user leaves the page open for a long time , I think it would be a problem....the other session has to wait for a long time.
I have no choice in decreasing the session timeout interval.

Please suggest , How can I handle this in ASP.

View Replies View Related

Request.form Usage Not Clear

I am trying to get a thorough understanding of a code where a addition or
deletion of records can be done from a list of records. For addition part of
the form, data is being obtained from set of input boxes. Code:

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

Out Of Memory?

We are receiving an error in our ASP website that used to run fine on our old servers but seems to be struggling on our new ones, I'm wondering if you've seen this error before?

Microsoft Cursor Engine error '8007000e'

Out of memory.

/oob/activities/default.asp, line 470

The last line that shows where the error happening is different on every page but it appears at the first database connection on each page.

The only way to get rid of the error and get the site working again is to recycle the application pool for the site (or restart IIS).

We have two servers, one running IIS and the other running MSSQL 2005. Both are the following specs: Code:

View Replies View Related

Memory - Only SQL?

I think I already know the answer ("NO"), but I figured I'd ask anyway:

Is there a way to populate a SQL-like object entirely in memory, without having to save it in a SQL-like environment like MySQL, MS-SQL, or Access?

I'd like to take the contents of some CSV's and dump them into a virtual SQL table, and then call from that table using a SQL statement ("SELECT * FROM VirtualTable WHERE Foo='Bar'"). I know that in .NET I could use a data-grid to do basically that, but I was wondering if there was a classic ASP solution.

View Replies View Related

Out Of Memory

I am getting an ASP error.. that tells the server it is OUT OF MEMORY.then the server displays a message about the DLLHOST.exe and it waits for an "OK" from me.after hitting OK... it goes back to working fine.BUT, while the notification is up on the screen.the website is NOT AVAILABLE.that is the message that visitors get when they try to get to the website.so, is there a way I can tell the system to SKIP the notification .andmjust restart the service.

What memory is the issue here.I am assuming this memory error is coming from an INFINITE LOOP or something.from one of my ASP pages. so, I would imagine the best move would be to get RID of the "On Error Resume Next" code at the top of my pages.. to try and isolate the problem?

View Replies View Related

ADO Memory Leak

I'm having a problem that I can only attribute to something that I don't
know about ADO. I am using an ADODB.Connection with .CursorLocation = 3
since I am using MSSQL with text fields.

I am running a large set of 4 LEFT JOINS (5 tables in all). Currently
my recordset is returning 168 rows and 23 colums. After looping through
the ADO connection 27 times (creating a pdf report for users to print)
the data goes nutz. I have tried using different inputs and no matter
what on the 27th time is stops.

View Replies View Related

IE Memory Profiler

Does any body know any tool that profiles Internet Explorer for memory
leaks.

View Replies View Related

ASP Out Of Memory Errors

I am trying to write a search script in my spare time at work. We have a knowledge base consisting of 200+ .mht files. My script was working ok when I was testing it on just a few files but I am getting out of memory errors trying to search through the whole KB. Here is the search code:

View Replies View Related

Release Memory

am just wondering is there a easier way to release all the memory after the program is done?or do I need to set all my variable = nothing one by one at the end of my code?

View Replies View Related

Eating Memory

We've got this problem on our site where slowly eats virtual memory until IIS stops serving pages...

Restarting the IIS process fixes the problem, until the next time it reaches that point. I've made sure all our ADO objects are being closed and set = Nothing. I don't know what else could eat up all that memory...

View Replies View Related







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