We have our web site setup on two seperate servers. They are connected together through a BIG/IP server. I'm not sure how many of you are familiar with BIG/IP (load balancing) but I'll give you a quick explanation:
When a user goes to our site, they hit our BIG/IP server first. This server looks at our two web servers and determines which one has more resources to spare. The BIG/IP then redirects the user to that server, where they are on the rest of the time they are on our site.
So we have two web servers with duplicate web sites running. My problem is I need to run one application object between both servers. Is this possible, or is there a work-around?
I am developing ASP application with complicated login system. There is several group of menu options. Each have form 5 to 15 sub-options.
User can work with any combination of options and sub-options and can see only these menu options which are allowed for him. "Rights rules" are store in SQL Tables and are getting after logon.
Now a questions:
1. what is the best way to store this menu structure (Session object is not allowed because it uses Cookies) ?
2. What is the best way to handle the "rights rules" ?
Below you can find quick links to information about the Application Object. I would write a post like my CDONTS one, but I just don't have time, but when I do, I'll see if I can get one done.
An intro to the Application object, this its in JScript but its easy to change Using the Application Object to Improve Performance
HOW TO: Declare an Array at Application Level Scope in Active Server Pages (Q165293)
A Real-World Example of Caching Data in the Application Object W3 Schools Application Reference
HOW TO: Use the Application Object to Store ASP State
I am trying to get to the application object from a seperate class in my ASP application and I dont want to pass the object in as the class is inherited to lots of other classes. So i can have something like the following:
Imports System.Web.UI.WebControls.DataGrid
Namespace Classes.Inheritable Public MustInherit Class EntityCollection
Implements IDisposable
Private mobjDataConnection As Classes.Databases.DBConnection
Public Sub New(ByVal strSQL As String) mobjDataConnection = Application("DataConnection") End sub
There seems to be plenty of discussion about caching in the Application Object, however, I cant find any info on what realistic limitations there are and how they are measured.
What are the factors that will limit performance / storage of many individual or single large bits of data with application scope? eg database driven list boxes (that dont require up to the minute data) 10 * 100 options? 100 * 100 options? kb's? megs of info? How much can I cache?
I'm trying to build a page that displays filtered data for a particular year and month. Page 1 has a form with two drop down menus, the first selects the year, the second, the month.
The problem is that the output page is only filtering the "fldYear" and not the "fldMonth" Here is the code for the form, as well as the asp for the output page. Code:
Rather than opening and closing a new connection to the database on every page, I have placed that connection into an Application variable. This has worked fine so far.
My issue is that I have a logoff page where it closes that connection.But this means that users who are on the application will not be able to access that connection.The obvious answer is that I don't close the database connection.But my problem is, I would like to eventually close that database connection.
How can I determine if an application variable (not session variable) exists?How can I determine that there are not any users on the application?
My asp application allows a number of users to log into it. Each user has a different type of access level (General User, Manager or Administrator). I want the administrator to be able to see how many other users are logged into the application at a particular time. How can I do this? Would the use of an application object work for this?
I made this little application-variable interface to help me see what application variables/values I currently have on the server and it lets me easily add or remove single variables, remove all the variables, or re-create the variables I declare in an ASP file called "CreateVariables.asp". Code:
We have ASP application running on IIS 5.1 and Windows 2000 server. The ASP application has few Application variables setup in global.asa. Something like this:
There is no other code in the ASP application to change the value in the Application variables. It's only set in global.asa and the rest of the application just read it with code similar to this: Response.Write(Application("fun"))
The application had been running fine until we deployed a COM DLL to the web server few weeks ago. Loos like the ASP application started to loose the value in application variable few times a day. Restarting the web service, which means re-initialize the value in Application object, fixes the issue but the value will be blanked out again after few hours.
The COM DLL is written in .Net C# to handle some task. This COM has "private static" variables in public class. The purpose for "private static" variables is that the value will be maintained until IIS is restarted.
Is it possible that the memory space for .Net run-time conflicts with the memory space of ASP Application object? Can someone help me understand what can cause this to happen?
We have pretty simple ASP (not ASP.Net) application, which has been running fine on IIS4 and IIS5. It has now been moved to a sever running in the DMZ and managed by a 3rd party. The server is Win2003 and IIS 6.0.
Within the Globe.asa file, have an Application_OnStart SubRoutine (Visual Basic) and it bombs out on the first line:
I'm looking for a way to allow only one user to access my web form at a time. so that if there is a user using my web page / html form.. then the next user is directed to another page. So only one user is allowed access at any given time .I was hoping there is a way to do this with Application variables.
I have a ASP and SQL Server website which uses a couple of Stored Procedures during the Shopping Cart process. 1 inserts the Customer information into a table and the next inserts the Payment information into a table.
I don't have access to the code now, but have found that many of our customers, especially those who use I.E 6 are having problems with a
" -2146824867 Application uses a value of the wrong type for the current operation"
error message which occurs when the Stored Procedure is executed.
I have looked through the Google archive but can't find anything specific about this message. Could anyone tell me if there is a known issue with IE6 and Datatypes with Stored Procedures, and if so how to resolve it?
I am currently working on a small asp application. Now I would like to store the complete database connection in the application object. Note I want to store the connection NOT the connectionstring. For that purpose I wrote a small asp include which connects to the dbase and stores the connection object to the application object. However when I use this include in my pages then it doesnt work. What I am doing wrong? Here is the code:
I'm using application variables for a web based sales tracking application. I use the variables for stuff like connection string, database name, etc. I store the values in a asp file that is included in a login page. The assignments are in a procedure that I then call on the login page. This is done everytime a user connects to the login page.
what's happening to the variables? Are they being overwritten everytime a user accesses the page? I'm not checking for the existence of the variables. I just call the routine everytime the page is accessed. I know the values are shared for all users but, I was wondering if I should check for the existence of variables? Will it free up resources? Should I be using locks?
i am getting this error 'object variable users not set' , can anyone help with what it means, the variable has been set in a global.asa file and i cant figure out what is wrong.
I've made some progress with the form I was struggling with Friday - basically, I'm trying to write an online application that lets people upload their resume, references and supporting material.
Not everyone will have supporting material, so I'm trying to write something that will just ignore any fields where someone hasn't uploaded. If someone hasn't uploaded a file for each form field, the code below gives me Code:
Im having a few prblems with object recordset and variables. I can print data into a table using objrecordset("Type").
But when i try to assign the value to a variable, ex. variable1=objrecordset("Type") i get an invalid use of null error. If i take out the code to assign it to a variable it works fine. So my question is how can i assign the value of objrecordset("type") to variable1.
Public Property Let TableName (sNewTableName) if sNewTableName <> "" Then sTableName = sNewTableName end if End Property
Public Property Get TableName () TableName = sTableName End property
.....
Then in a login page i do this
Set Session("cart") = New CShoppingCart
so now, the cart is a session object that can be called from every page in this session BUT.... when i do this in a different page:
Response.Write Session("cart").TableName
I get an asp error (Erreur d'exécution Microsoft VBScript (0x800A01B6) )saying this is not a supported method (the error is actually in french! i can paste it if u want)
The object seems to be valid (IsNull return false and IsObject returns true) but i cannot invoke its methods and read its properties ....
I've been browsing this and a few other related newsgroups trying to get my head around this problem, and so far all the trails seem to go cold, without an acceptable solution being reached. I'm posting here because there seems to be a few MVP's knocking around, and if they dont know, then it's a safe bet nobody does.
I'm beginning to think that what I want to do is simply not possible - but i'll put it out there once more.
Here goes: I'm writing a content managaement system - and i'm making use of dynamic includes via the "read a text file" technique, and then substitiuting values into markers in the template. Code:
We have our web-site developed in classic ASP, and I need to add this additional feature on one of the pages to access a VB application. How can I do that? The VB application basically sends output to the COM3 port and opens a USB-Cash drawer that is attached to it. I am not sure how to go about with this.
I'll admit my ASP skills are very rusty, and come seeking help.
I'm currently using a dictionary object to store a multi-dimensional array.
I want to pass this dictionary object to an object, which holds an array of dictionary objects.
However I'm finding that the array is not getting set, thus I'm having great issue with dynamically resizing the object's property for every new dictionary object I'm adding.
I have a VC++ COM object which fires an event. I've written VB EXE apps against it and they receive the event notification.
I've now built a simple VB COM object which uses the VC++ COM object internally.
My question is, assuming the ASP page which loads the object does not immediately exit, will the VB COM object be able to receive the events from the internal object?