473,811 Members | 3,087 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application variable in Session_OnStart in global.asax.vb

Hi all,

I've got an weird problem with Application variables in Global.asax.vb.
I have three Application variables set up in Session_OnStart event and
I'm displaying the values of those variables in an .aspx page. It works
fine in the development server, but it only sets up the first
Application variable and I can only see the first variable value in the
same .aspx page in the live server.

** Development Server **
1. "First value"
2. "Second value"
3. "Third value"

** Live Server **
1. "First value"

I'm using the exactly same DLL in both servers and there is no
difference whatsoever.
Is it caused by a different server configuration between two servers?
Can a limitation on the number of Application variables be set up?

I have no idea what's going on here. Can anyone help me up with this
please?

Cheers,
Chan

Dec 18 '06 #1
2 2167
Post the code

--
Ciaran O''''Donnell
http://wannabedeveloper.spaces.live.com
"pa******@hotma il.com" wrote:
Hi all,

I've got an weird problem with Application variables in Global.asax.vb.
I have three Application variables set up in Session_OnStart event and
I'm displaying the values of those variables in an .aspx page. It works
fine in the development server, but it only sets up the first
Application variable and I can only see the first variable value in the
same .aspx page in the live server.

** Development Server **
1. "First value"
2. "Second value"
3. "Third value"

** Live Server **
1. "First value"

I'm using the exactly same DLL in both servers and there is no
difference whatsoever.
Is it caused by a different server configuration between two servers?
Can a limitation on the number of Application variables be set up?

I have no idea what's going on here. Can anyone help me up with this
please?

Cheers,
Chan

Dec 18 '06 #2
Hi again,

I've changed the code so it uses settings in Web.Config instead of
using Application variable, and it works now.

Thanks,
Chan

Dec 20 '06 #3

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

Similar topics

4
1805
by: Me_Titus | last post by:
I would like to know if there is any kind of difference between an empty web project and an web application project other than all the files stucked toghether to the web application project. I am asking this because if i set an application variable in the web application project and retrieve its value in another page(page.aspx) the application variable comes with the vatue i set on the global.asax, but if a do the same on the empty web...
3
313
by: Craig | last post by:
In my global.asax file I have a variable in the application on start event called Application("FolderName"). On the development PC the variable is set as Application("FolderName") = "c:\FolderName" On the production PC the variable is set as Application("FolderName") = "d:\ADifferentFolderName" When I 'Copy Web' using Visual Studio.NET I copy all files except the
7
1569
by: weeerob | last post by:
Is there anyway to stop the application starting during the Application_Start event in the Global.asax.cs file? I want to check a license key at this point and not let the application start if it's invalid. I've tried throwing an exception but that doesn't seem to have any affect. Thanks,
1
1879
by: Goober | last post by:
I converted a website that was done in ASP to dotnet, and brought over a number of items, some of which don't appear to work in the same way on dotnet as they did on ASP. One of them is an application variable. I have this code in my global.asax in the Sub Session_Start: Application.Lock() 'Add 1 to active visitor count when new visitor Application("counter99") = Application("counter99") + 1
20
4524
by: J-T | last post by:
We are working on an asp.net application which is a 3-tier application.I was aksed to create a component which monitors a folder and gets the file and pass them to a class library in our business logic layer(so far so good and easy).I initialize my class which is using a FileSystemWatcher in my Global.asax and everything works fine.I have found FileSystemWatcher class not very reliable and sometimes it behavies unexpectedly.I'm afriad that...
8
4882
by: Vishwanathan Raman | last post by:
Hi I have a declared a static DataSet object SOBJ in Global.asax.I also have a localy defined DataSet LSOBJ in Global.asax which I am storing in Application State.Is there any technical differences in the way both the objects are handled by IIS. Are both objects stored in different memory spaces? I can access both the objects in my web page. I will be grateful if some one can help me understand the difference.
6
1509
by: Chase | last post by:
I'm pretty new to asp.net and am having problems with my application timing out. I've written an application that loops through all of the information on an excel spreadsheet and does certain things with it, like creating and configuring WSS sites. My application runs fine for approximately 25 minutes, then I get the 'Page cannot be displayed' error. It seems like my browser times out before the application can finish what its doing.
11
4986
by: Marc | last post by:
Hello. Apologies if this is the wrong group. I have created a class called "page" which i would like to add to the global.asax and then call from any control within the website. I have currently got: global.asax <%@ import Namespace="myNamespace" %> <script language="C#" runat="server">
13
1722
by: michel | last post by:
Hi, i created a class 'test' with a method 'descrlimit()' (no matter). That method is used in a lot of pages in the application, so i need to put this code a lot of time: "Dim odescr As New test" In order to avoid that, i wonder whether it would be possible to put that line in a central place, like global.asax. I tried this:
0
9734
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, 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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10398
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10138
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 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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7676
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6897
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5567
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4357
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 we have to send another system
2
3881
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3028
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.