473,396 Members | 2,106 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Sharing a variable across virtual roots

5
Hi

I have a website which is accessed externally via one virtual root ( requires SSL) and internally via an other virtual root. Is there a simple way to share variable, ie something like Application("variable") across the roots?
I have tried defining the variable in global.asax but run into access issues.

/bo
Feb 22 '08 #1
9 1010
boho
5
Anybody have any hints?
Mar 3 '08 #2
Plater
7,872 Expert 4TB
(I don't know for sure, subscribing because I would like to know how as well)
Isn't there like an app.config file that works like the web.config? I don't think you can change those on the fly in the program, but it would allow for some common things to be shared?

Can you get away with using the Session object?
Mar 3 '08 #3
boho
5
Hi

I doubt that the session object will be of any help since I need to share the variable across all sessions on both applications.

/bo
Mar 6 '08 #4
Plater
7,872 Expert 4TB
Wait wait wait.
You need an "in memory" value that will be used (either read or updated) from any session?

Just use a static class, it's one class for all users, regardless of session
Mar 6 '08 #5
boho
5
The value needs to be updated.
The value is actually an indicator to show if there are any messages to fetch. If the flag indicates false no search is performed, and if the flag is true a search is done. Another agent is sending the messages an updates the flag when a message is sent. The 2 agents exist in different applications since one accesses the website via HTTP and the other one via HTTP. I found no way to combine HTTP and HTTPS under one virtual root so I created 2 virtual roots, where one only accepts the trusted party via HTTP, and all others must use the HTTPS root.
Mar 7 '08 #6
Plater
7,872 Expert 4TB
Static classes can contain variables for updating.
Mar 7 '08 #7
boho
5
Ok. Where should I create such a class so it is reachable from different applications? Could I create a "machine" class somehow?
Mar 8 '08 #8
kenobewan
4,871 Expert 4TB
I may be barking up the wrong tree (have you ever seen a dog in a tree?), but I see three possible methods.

1) A boolean value should pose no threat if passed by a querystring, at least my bank sees no harm no foul
2) Class libraries are used in web farm/gardens and may or may not be useful here
3) If 1 & 2 aren't desirable, I assume this also may be achieved with a webservice
Mar 8 '08 #9
Plater
7,872 Expert 4TB
Ok. Where should I create such a class so it is reachable from different applications? Could I create a "machine" class somehow?
Either I read your original question wrong or you edited it after I read it, but ok I see now what you were getting at.
A webservice might be the best route, although I am pretty sure there is like a machine.config type thing that you can specify in your config sections to allow some data to be shared between web applications.
Maybe Frinny knows?
Mar 10 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

42
by: Dan | last post by:
Hello, I have trouble with class calling. I am calling getvolume() with succes in the function CreateCircle but it do not want to call it in ShowCircle() function. I am staying in the same...
3
by: Sheila Jones | last post by:
Hello, Could somebody explain (or point me to a website that does) the difference between a 'virtual directory' and an 'application root'? I don't really get it at the moment. Thanks.
1
by: Stu Lock | last post by:
Hi, I am setting a session in one directory ('/admin/login.aspx'). The project for this folder is runnig in the root directory of the server. I am then redirecting to to a virtual directory...
4
by: Anders K. Jacobsen [DK] | last post by:
Hi I have some common UserControls i want to share between to sites (on the same mashine but on diffrent virtual paths). right now i have on solution file with aprox 10 projects. 2 of these is...
0
by: Jay | last post by:
I have an ASP.NET application that I have written which I would like to use on multiple clients websites. My issue is that the application will be exactly the same for each website it is...
0
by: dotnetmuddu | last post by:
Hi, Have you guys come across this ? Can I share the session state between virtual directories. Ex : I have Virtual Dir SessionTest1 & SessionTest2. If a variable Session = "testuser"...
2
by: Tophog | last post by:
I haven't done a lot of file I/O in .NET and thought I had this figured out. I am simply wanting to move a UNC-based directory path to a new path using DirectoryInfo. Example: Source...
2
by: aruna.mysore | last post by:
Hi all, I have specific question about usage of extern. I want to share a single variable say int a; across multiple files. I would define it in file1.c as int a=0; int main() {
1
by: =?Utf-8?B?QiBTaW5naA==?= | last post by:
Hi Scenario 1) Host - XP Laptop with internet connection using Sky Broadband Wireless Router Netgear DG834GT 2) MS Virtual Server 2005 - I have deployed an XP MS Virtual Server 2005 to act...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...

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.