473,321 Members | 1,667 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,321 software developers and data experts.

application varables and namespaces in external assemblies

DDE
Hi all,

I have an application (number of web Services) in which I define different
application variables, like application["logFile"] etc. Besides that, I have
a couple of assemblies containing classes and STATIC methods used by those
web services. I can't find any way to access my application variables from
those methods definde in the external assemblies.
ex:
in my external assembly, i have the following:

namespace mycompany.toolbox {
using system;
using system.IO;
......

public class Tools () {
public static void AddToLog(String message) {
FileStream myLog = new
FileStream(Application["logFilePath"].ToString, ............
}
}
}

This gives me a CS01020 "In order to use a non-static field, method, or
property, you must first create an object instance.

" although application["logFilePath"] is defined in my main application.
Everything works if my AddToLog method is defined in my main app, instead of
an external assembly

Thanks Dominique
Nov 15 '05 #1
0 1211

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

Similar topics

12
by: Santiago de Compostela | last post by:
Hi The following program doesn't compile on MS VC++ or Bloodshed Dev-C++ #include <iostream> int strlen(const char *in) {
3
by: Richard J | last post by:
Hi group, I am relatively new to .NET and am trying to wrap my brain around a concept. Say I have Assembly A1 that contains three namespaces, N1, N2, and N3. If I add A1 as a reference to my...
1
by: Josema | last post by:
Hi, My question its more about the theory about how to organize namespaces, assemblies, etc... Im very desorganized, and sometimes i create for instance some classes and namespaces, but when...
17
by: clintonG | last post by:
Using 2.0 with Master Pages and a GlobalBaseClass for the content pages. I understand the easy part -- the hierarchical structure of a namespace naming convention -- but the 2.0 IDE does not...
11
by: Random | last post by:
I'm confused about the proper use and usefulness of namespaces. I beleive I understand the purpose is so the developer can put classes within namespaces to essentially organize your code. And I...
4
by: Max | last post by:
Hello, I have written a VB.NET Windows application that will be used by my customers to automate another application. I want to allow my users to execute Visual Basic code that they have...
5
by: PGP | last post by:
I am trying to work with some C# namespaces from managed c++. The namespaces use a dot notation and generates a compiler error. Is there a way around this? #using "csharpassembly.dll"//has the...
13
by: Kobee | last post by:
Hi, I'm having a few issues adapting to new 2.0 "website" project vs. the old 1.1 "web application". One of the major issues I'm having is with the notion of namespaces. Using the old way, I...
2
by: OHM \( One Handed Man \) | last post by:
I have two assemblies with a different implementation of the same class Lets say ns1 and ns1 with the class Widget. I add the references to the project and put in aliases in each of the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.