hi,
i have a program that when executed, creates an instance of itself and then runs a method (that has been written in its base class). This works fine, and looks like this;
public static void Main(string[] args) {
ObjectOne myObject = new ObjectOne();
myObject.performUpdate();
}
I have a windows service that wakes up at a certain point, and calls a webmethod located on a web service. This method calls a static method in another class which does the exact same thing as the program above. It looks like this;
public static void update() {
ObectTwo myObject = new ObjectTwo();
myObject.performUpdate();
}
Both of these classes run the 'performUpdate()' method, which is located in their shared abstract base class. The first one (the exe) runs fine. The second one which is initiated by the webmethod fails with an "Object reference not set to an instance of an object". I have narrowed it down to the problem. When the 'performUpdate()' method is called.... amongst other things, it creates a web-reference - and begins calling other webmethods. It is the instansiation of this web-reference that is failing.
I can only think that because a webmethod is creating a class which then goes and creates a web-reference so it can access other webmethods in the service that actually created it - its getting confused :-) ??
I know this might seem as clear as mud, but any help would be really appriciated!!!
UPDATE:: I set it to break on any exception, and the line comes up with;
"TBS.US.ServiceAgents.USWebService.XmlSerializ ers' failed to load in the 'LoadFrom' binding context of the AppDomain with ID 76. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'TBS.US.ServiceAgents.USWebService.XmlSerializers, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'TBS.US.ServiceAgents.USWebService.XmlSerializers, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'"
TBS.UC.ServiceAgents.USWebService is my project web service