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